解決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