brew update慢

經調查發現是因爲brew的官方鏡像被牆導致更新緩慢(很奇怪,我翻牆了呀)。

第一步,替換brew.git

cd “$(brew --repo)”
git remote -v

可以看到官方鏡像是https://github.com/Homebrew/homebrew

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進行更新,發現速度變的很快。替換鏡像完成,我們將官方鏡像替換成了中科大的鏡像

知識共享許可協議
本作品採用知識共享署名-非商業性使用-相同方式共享 4.0 國際許可協議進行許可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章