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


正确安装的输出:

<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。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值