然后需要關掉終端,進入
/user/local/Homebrew/Library/
文件夾下,刪除Taps文件夾,執行以下命令:
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
然后執行以下命令即可:
cd $(brew --repo) git remote set-url origin https://mirrors.ustc.edu.cn/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git