一、获取 install 文件
获取官网的脚本
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_instal
二、更改脚本中的资源链接替换成清华大学的镜像,修改如下两句:
BREW_REPO = “https://github.com/Homebrew/brew“.freeze
CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core“.freeze
更改为
BREW_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git".freeze
CORE_TAP_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git".freeze
三、运行脚本
/usr/bin/ruby brew_install
网友评论