解决brew下载慢的问题

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

3.替换homebrew-bottles

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

4.执行更新,使之生效

brew update

brew update 执行时间可能比较长,耐心等待

你可能感兴趣的:(解决brew下载慢的问题)