1. 首先替換Homebrew源
// 替換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
2. 更新bash_profile
// 如果home目錄下沒找到.bash_profile文件直接創(chuàng)建即可
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
最后別忘了執(zhí)行更新 source ~/.bash_profile