一、獲取 install 文件
獲取官網(wǎng)的腳本
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