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

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

你可能感兴趣的:(Mac解决brew安装软件速度太慢的问题,亲测有效)