Mac系统下,brew安装慢的主要有2个方面:
- brew update 慢
- brew upgrade 慢
brew update 慢
主要是要解决 .github 慢,打开终端运行以下命令:
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
brew upgrade 慢
打开终端运行以下命令:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles'>> ~/.bash_profile
source ~/.bash_profile