美文网首页Mac
替换Homebrew默认源(使用中科大镜像)

替换Homebrew默认源(使用中科大镜像)

作者: Ddaidai | 来源:发表于2017-03-12 14:45 被阅读0次

由于国内网络的问题,Homebrew 速度实在是让人汗颜。。。

经常卡死

Homebrew 主要分两部分:git repo(位于GitHub)和二进制 bottles(位于bintray),我们可以将这两者替换成国内的镜像,便可解决在国内访问不太顺畅的问题。下面我使用中科大镜像为例:

1.替换Homebrew默认源
cd "$(brew --repo)"

git remote set-url origin git://mirrors.ustc.edu.cn/brew.git
2.替换Homebrew Bottles源
echo 'export HOMEBREW_BOTTLE_DOMAIN=[https://mirrors.ustc.edu.cn/homebrew-bottles](https://mirrors.ustc.edu.cn/homebrew-bottles)'
 >> ~/.bash_profile

source ~/.bash_profile

相关文章

网友评论

    本文标题:替换Homebrew默认源(使用中科大镜像)

    本文链接:https://www.haomeiwen.com/subject/wtgtnttx.html