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