腳本備查:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
前兩步實際上就是去/usr/local/Homebrew目錄下把brew和brew-core的git路徑給換了,最后一步是二進制源需要修改bashprofile文件改變量。
完后再執行一次brew update
