https://www.jianshu.com/p/055832c19148
由於問題主要是在國內網絡環境github下載慢,因此嘗試:
更換使用國內的homebrew鏡像源;
使用代理訪問github.com。
使用以下命令更換國內阿里雲上的homebrew鏡像:
# 替換brew.git:
cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替換homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 替換homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc source ~/.zshrc