Mac系统下 brew 更换清华源

成功安装brew后,输入如下命令:

1、官网brew.sh复制安装脚本。

2、自动安装完成后,更换为清华源来加快速度。网址为:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew

3、更换homebrew

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 (长期换源)

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

 

posted @ 2019-06-08 17:21  挺锅锅  阅读(7775)  评论(0编辑  收藏  举报