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