HomeBrew 安装软件慢的解决方法

2018-11-27  本文已影响262人  万有引力万有

用原有的镜像下载非常慢 => 🚶

替换源,更新速度变成 => 🚀

第一步:更换源

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

第二步:更换 Homebrew-bottles 镜像

临时替换

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles

永久替换

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

参考链接:清华homebrew源

上一篇 下一篇

猜你喜欢

热点阅读