How to make brew faster 使用mirror 加速brew的安装过程

来源:互联网 发布:腾讯云数据库怎么连接 编辑:程序博客网 时间:2024/05/17 03:14

How to make brew faster when you behind GFW


In China side which is behind GFW, we must suffer from an extremely slow network to use brew. Sometimes, this will even make brew unavailable any more.

How to resolve it?

Thank for USTC and THU, we have brew mirror inside.

cd /usr/localgit remote set-url origin http://mirrors.ustc.edu.cn/homebrew.gitorgit remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.gitbrew update

If still very slow,

 

cd ~/tmpgit clone http://mirrors.ustc.edu.cn/homebrew.gitorgit clone git://mirrors.tuna.tsinghua.edu.cn/homebrew.gitAbove steps will download the latest homebrew into ~/tmp directory, and then reinstall homebrew as following steps:remove old brew installation:rm -rf /usr/local/.gitrm -rf /usr/local/Libraryrm -rf /usr/local/bin/brewReplace with new homebrew files:cp -R homebrew/.git /usr/local/cp -R homebrew/Library /usr/local/cp homwbrew/bin/brew /usr/local/bin/and then:brew updatebrew install ***

0 0
原创粉丝点击