mac brew 换源 解决安装软件速度慢等问题

  1. 由于 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

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

你可能感兴趣的:(mac,环境安装)