一、問題原因是更新源:
1、默認源:https://github.com/Homebrew/homebrew.git
2、替換爲國內源:
(1)中科大brew鏡像源 http://mirrors.ustc.edu.cn/homebrew.git
(2)清華brew鏡像源 http://mirrors.ustc.edu.cn/homebrew.git
二、操作步驟:
1、替換 brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
2、替換 homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git