下载完homebrew后使用brew install可能过慢,可以切换成阿里镜像,提高安装速度。
终端输入以下命令:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
当前用户变量配置:
sudo vi ~/.bash_profile
添加一行:
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles
wq保存退出,执行命令:
source ~/.bash_profile