在升级 ruby的时候,使用了如下命令
curl -L https://get.rvm.io | bash -s stable --ruby
结果提示 : you need to make "brew update" avalabile.
我试了一下,果然 “brew update” 卡着不动。执行以下命令切换 brew 源。
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.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 了。
原文:https://www.cnblogs.com/demingblog/p/11436602.html