解决brew update很慢


一般遇到这种问题,就跟墙有关啦,需要更换源。
用清华的源就非常好,去清华镜像的官网看一下说明,https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

$ cd /usr/local/Homebrew $ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git $ cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core $ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git $ brew update 

即可

复原

$ cd "$(brew --repo)" $ git remote set-url origin https://github.com/Homebrew/brew.git $ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" $ git remote set-url origin https://github.com/Homebrew/homebrew-core $ brew update 

"$(brew --repo)" 这里填/usr/local/Homebrew




免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM