Brew发现自动更新homebrew时卡住


原因

因为我之前换过源,换成了是阿里的源,然后阿里的源没有cask,所以出错在这里

解决

换成中科大的源

// 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

// 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

// 替换homebrew-cask.git:
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask 
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

更新源

brew update

之后再次安装就解决了问题


原文链接:https://www.cnblogs.com/guizimo/p/13333999.html