美文网首页iosmacOS
苹果系统macOS下使用国内镜像安装Homebrew

苹果系统macOS下使用国内镜像安装Homebrew

作者: iCloudEnd | 来源:发表于2019-03-13 15:16 被阅读10次

苹果系统macOS下使用国内镜像安装Homebrew

修改安装脚本并安装

cd ~
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install

编辑brew_install文件

注释掉BREW_REPO = "https://github.com/Homebrew/brew".freeze和CORE_TAP_REPO = "https://github.com/Homebrew/homebrew-core".freeze

修改为
BREW_REPO = "git://mirrors.ustc.edu.cn/brew.git".freeze
CORE_TAP_REPO = "git://mirrors.ustc.edu.cn/homebrew-core.git".freeze

安装

/usr/bin/ruby ~/brew_install 

替换homebrew源

cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

brew update

设置 bintray镜像

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

相关文章

网友评论

    本文标题:苹果系统macOS下使用国内镜像安装Homebrew

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