MAC 安装 Homebrew最新地址变更:
原命令:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
提示含错误:
400 Bad Request
或:
Whoops, the Homebrew installer has moved! Please instead run:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Also, please ask wherever you got this link from to update it to the above.
Thanks!
替换为:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
即可开始安装。
如果出现:
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
执行:
rm -rf /usr/local/Cellar /usr/local/.git
清理,再重新安装。
正确安装的输出:
<p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #5330e1"><strong>==></strong></span><strong> This script will install:</strong></p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">/usr/local/bin/brew</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">/usr/local/Library/...</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">/usr/local/share/man/man1/brew.1</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">
</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">Press RETURN to continue or any other key to abort</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #5330e1"><strong>==></strong></span><strong> Downloading and installing Homebrew...</strong></p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">remote: Counting objects: 3689, done.</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">remote: Compressing objects: 100% (3522/3522), done.</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">remote: Total 3689 (delta 36), reused 508 (delta 26), pack-reused 0</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">Receiving objects: 100% (3689/3689), 3.03 MiB | 7.00 KiB/s, done.</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">Resolving deltas: 100% (36/36), done.</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">From https://github.com/Homebrew/homebrew</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;"> * [new branch] master -> origin/master</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">HEAD is now at 70752bb boot-clj 2.2.0</p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #5330e1"><strong>==></strong></span><strong> Installation successful!</strong></p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; color: #5330e1"><strong>==></strong></span><strong> Next steps</strong></p><p style="margin-top: 0px; margin-bottom: 0px; font-size: 11px; font-family: Menlo;">Run `brew help` to get started</p>
出现提示 Installation successful 表示已经安装成功。由于国内访问比较慢有的时候是需要等待的,速度只有10k/s。