HomeBrew 官方安装太慢而失败?更换homebrew源

1. 获取官网脚本

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

2. 更改镜像,替换成国内的镜像

如下:

BREW_REPO = "https://github.com/Homebrew/brew"

CORE_TAP_REPO = "https://github.com/Homebrew/homebrew-core"

更改为这两句

BREW_REPO = "https://mirrors.ustc.edu.cn/brew.git"

CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core.git"

3. 执行脚本

使用ruby安装homebrews

/usr/bin/ruby brew_install

你可能感兴趣的:(HomeBrew 官方安装太慢而失败?更换homebrew源)