brew

brew如果不换成国内源,安装软件时候可能会出问题,不是安装不了就是速度很慢,所以使用它,更换国内游是比较好的选择!

我更换的是清华大学开源软件镜像站,打开shell窗口,依次执行下面命令:

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

全部执行完毕后,就更换成了清华大学的源了,这时,你再试一试安装软件!

参考:

https://mirror.tuna.tsinghua.edu.cn/help/homebrew/

https://blog.csdn.net/jeikerxiao/article/details/72705629

原文地址:https://www.cnblogs.com/sunylat/p/9680433.html