brew 更換國內源(鏡像)

cd /usr/local
git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.git
brew update

若是速度仍是很慢,能夠嘗試如下操做: 而後重試update。python

cd ~/tmp
git clone git://mirrors.tuna.tsinghua.edu.cn/homebrew.git
rm -rf /usr/local/.git
rm -rf /usr/local/Library
cp -R homebrew/.git /usr/local/
cp -R homebrew/Library /usr/local/

使用homebrew-science或者homebrew-python

cd /usr/local/Library/Taps/homebrew/homebrew-science
git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew-science.git

cd /usr/local/Library/Taps/homebrew/homebrew-python
git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew-python.git

brew update

 

來源:http://mirrors.tuna.tsinghua.edu.cn/help/#homebrewgit

相關文章
相關標籤/搜索