brew update 很慢


brew使用國內鏡像源
這里用中科大的,另外還有清華的可用

# 步驟一
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 update,brew install速度變快很多了,不會卡在那半天沒動靜,替換鏡像完成。

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安裝出錯 可以使用下面方式

https://gitee.com/cunkai/HomebrewCN
HomebrewCN
Homebrew 國內自動安裝腳本

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"


參考來源:https://www.uedbox.com/post/57246/


免責聲明!

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



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