Mac解决brew安装软件速度太慢的问题,亲测有效

2020-03-01  本文已影响0人  西江月影

1. 首先替换Homebrew源

// 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

// 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

2. 更新bash_profile

// 如果home目录下没找到.bash_profile文件直接创建即可
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile

最后别忘了执行更新 source ~/.bash_profile

上一篇 下一篇

猜你喜欢

热点阅读