美文网首页
brew安装慢问题解决方案

brew安装慢问题解决方案

作者: purewater2014 | 来源:发表于2018-11-06 09:57 被阅读145次

通过添加国内镜像源来加速下载

1.Mac上Homebrew安装可通过下面这条命令完成

 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Homebrew 二进制预编译包的镜像

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles'>>   ~/.bash_profile

source ~/.bash_profile

3. Homebrew 的 formula 索引的镜像(即brew update时所更新内容)

    cd "$(brew --repo)"

    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

    brew update

相关文章

网友评论

      本文标题:brew安装慢问题解决方案

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