mac brew update 卡着不动的问题

让人想犯罪 __ 提交于 2019-11-29 00:37:54

在升级 ruby的时候,使用了如下命令

curl -L https://get.rvm.io | bash -s stable --ruby

结果提示 : you need to make "brew update" avalabile.

我试了一下,果然 “brew update” 卡着不动。执行以下命令切换 brew 源。

第一步,替换brew.git

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

第二步:替换homebrew-core.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

此时执行“brew update” ok 了。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!