Updating Homebrew… 长时间不动——建议替换Homebrew默认源为清华源或者中科大源
替换及重置Homebrew默认源网址:
https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git
- 替换具体操作:终端输入
替换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# 更换后测试工作是否正常
brew update
- 重置具体操作:终端输入
重置brew.git:
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git重置homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git