mac brew update 卡着不动的问题

在升级 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 了。

posted @ 2019-08-30 18:51  逃离沙漠  阅读(3699)  评论(2编辑  收藏  举报