brew update的时候报错:
...
Error: Fetching /usr/local failed!
Fetching /usr/local/Library/Taps/homebrew/homebrew-core failed!
Fetching /usr/local/Library/Taps/caskroom/homebrew-cask failed!
...
造成这种错误的原因有很多种,首先排除国外源的网络过慢的问题,把brew的源更换为中科院的:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
brew update
但是本人更换之后依然提示失败,经过一番尝试,重新安装git后update成功
brew install git