mac上安裝brew如何加速


下載安裝

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

遇到

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

原因,要FQ架梯子,架好梯子后,會出現如下

 

等待很長時間后,又遇到如下:

==> Tapping homebrew/core

Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...

又要很長時間等待,不能再忍了

換國內的源來加速,例如清華的(https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

執行如下命令

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

brew update

完成安裝

 

brew安裝卸載命令

brew install wget

brew uninstall wget

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM