MAC 安装 Homebrew 错误解决

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
清理,再重新安装。


正确安装的输出:

==> This script will install:

/usr/local/bin/brew

/usr/local/Library/...

/usr/local/share/man/man1/brew.1

Press RETURN to continue or any other key to abort

==> Downloading and installing Homebrew...

remote: Counting objects: 3689, done.

remote: Compressing objects: 100% (3522/3522), done.

remote: Total 3689 (delta 36), reused 508 (delta 26), pack-reused 0

Receiving objects: 100% (3689/3689), 3.03 MiB | 7.00 KiB/s, done.

Resolving deltas: 100% (36/36), done.

From https://github.com/Homebrew/homebrew

 * [new branch]      master     -> origin/master

HEAD is now at 70752bb boot-clj 2.2.0

==> Installation successful!

==> Next steps

Run `brew help` to get started


出现提示 Installation successful 表示已经安装成功。由于国内访问比较慢有的时候是需要等待的,速度只有10k/s。


你可能感兴趣的:(Mac开发)