Macbook brew 安装软件 一直updating Homebrew

在用brew安装新的软件的时候一直出现:

Updating 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 

猜你喜欢

转载自www.cnblogs.com/diaolanshan/p/10187763.html