看到
Mac下安装Homebrew踩坑记录 https://www.jianshu.com/p/24c7430fa124
我也踩了坑
也卡在了这里
然后,用这个办法:
把Homebrew-core的镜像地址也设置为清华的国内镜像
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
(————————————————
版权声明:本文为CSDN博主「小米修修」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wei_ada/java/article/details/104321695)
但是我用的科大镜像而不是清华:
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
如果显示
Already up-to-date
表示成功