[Mac环境安装] 安装Brew

2019-01-25  本文已影响15人  后端技术学习分享

由于国内的原因,Mac下brew总是无法安装,在第一步获取安装文件时就一直卡死。

安装方法

https://raw.githubusercontent.com/Homebrew/install/master/install

假设下载下来的文件名时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

ruby install

可能会很久,耐心

cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git
上一篇下一篇

猜你喜欢

热点阅读