切换中科大镜像源:
- 替换brew.git
1
2
3cd /usr/local/Homebrew
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
切换回官方源:
- 替换homebrew-core.git
1
2
3
4
5cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
brew update
切换官方源:
- 替换Homebrew Bottles源
1
2
3echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
切换回官方:
删除~/.bash_profile中的HOMEBREW_BOTTLE_DOMAIN源即可