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