这是git源问题,换到国内源:
先替换brew.git:
cd “$(brew --repo)”
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
再替换homebrew-core.git:(提示homebrew-core目录不存在,可先跳过,进行后面更新步骤后再设置这一步)
cd “$(brew --repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
检查更新
brew update
执行更新(国内源下载速度很快):
brew upgrade