HomeBrew中国镜像源
By admin
- One minute read - 69 wordsMac 终端跑入即可
cd /usr/local/
git remote set-url origin http://mirrors.ustc.edu.cn/homebrew.git
#或者这个:
git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.git
brew update
如果还是感觉慢,看看这个: https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
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/
然后重试update。
使用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
也可以使用coding.net提供的镜像
$ cd /usr/local && git remote set-url origin https://git.coding.net/homebrew/homebrew.git
$ brew update