homebrew主要分兩部分:git repo(位於GitHub)和二進制bottles(位於bintray),這二者在國內訪問都不太順暢。能夠替換成國內的鏡像,git repo國內鏡像就比較多了,能夠自行查找,提供二進制鏡像的。如國內的源暫時沒法訪問也能夠替換回官方的源。git
中科大鏡像:https://lug.ustc.edu.cn/wiki/mirrors/help/brew.gitgithub
清華鏡像:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/url
恢復官方鏡像:spa
#重置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