一、问题原因是更新源:
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