美文网首页
Homebrew替代镜像源

Homebrew替代镜像源

作者: hromi | 来源:发表于2019-05-18 17:48 被阅读0次

国内homebrew连接速度不稳定,brew update 经常卡死,可以通过替换镜像源的方式提高连接的稳定性

cd  $(brew --repo)  #进入 homebrew 根目录
git remote set-url origin  https://mirrors.ustc.edu.cn/brew.git #替换brew远程库
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git #替换 home-brew 远程库
echo "export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles">>~/.zshrc #替换bottles源,根据 bash 的不同有区别
source ~/.zschrc
brew update #应用

国内源

中科大:https://mirrors.ustc.edu.cn/brew.git

清华大学:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

参考:
使用镜像换源让 brewhome 飞起来

相关文章

网友评论

      本文标题:Homebrew替代镜像源

      本文链接:https://www.haomeiwen.com/subject/enitzqtx.html