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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM