安裝homebrew很慢卡住了


https://blog.csdn.net/DiyHzp/article/details/90763558

網速快可使用此方法官網安裝Homebrew
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install

打開 brew_install 文件,修改如下:
找到如下代碼:
BREW_REPO = “https://github.com/Homebrew/brew“.freeze
CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core“.freeze
復制代碼更改為:
BREW_REPO = “https://mirrors.ustc.edu.cn/brew.git “.freeze
CORE_TAP_REPO = “https://mirrors.ustc.edu.cn/homebrew-core.git“.freeze
注意:
新版本HomeBrew可能沒有CORE_TAP_REPO這句代碼,如果沒有不用新增。

執行腳本
/usr/bin/ruby brew_install
此時腳本應該停在
==> Tapping homebrew/core
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core’…
解決方法,手動執行下面這句命令,更換為中科院的鏡像:
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

然后就替換homebrew源

 https://www.cnblogs.com/DjangoBlogs/p/10762310.html


免責聲明!

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



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