经调查发现是因为brew的官方镜像被墙导致更新缓慢(很奇怪,我翻墙了呀)。
第一步,替换brew.git
cd “$(brew --repo)”
git remote -v
可以看到官方镜像是https://github.com/Homebrew/homebrew
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
再次使用brew update
进行更新,发现速度变的很快。
至此替换镜像完成,我们将官方镜像替换成了中科大的镜像。
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。