【macOS】解決 brew update 更新慢的問題

一、問題原因是更新源:

1、默認源:https://github.com/Homebrew/homebrew.git

2、替換爲國內源:

       (1)中科大brew鏡像源   http://mirrors.ustc.edu.cn/homebrew.git

       (2)清華brew鏡像源 http://mirrors.ustc.edu.cn/homebrew.git

二、操作步驟:

1、替換 brew.git

cd "$(brew --repo)" 
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

2、替換 homebrew-core.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

 

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