我这里更换的是清华镜像源当然还有很多其他镜像源你可以根据自己的网络情况来定
更换为清华源来加快速度。网址为:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew
清华镜像源官方网站:https://tuna.moe/
下面是详细的更换步骤
cd "$(brew --repo)"
git remote set-url origin
https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
brew update
替换为中科大镜像
替换HomeBrew默认源
cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git
替换HomeBrew Bottles源
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
brew update可能有点慢需要几分钟,这个根据自己的情况来定需要耐心的等待
https://www.jianshu.com/p/5f1efab5a40a