1.brew 安装加速
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
将brew_install文件中的 BREW_REPO 修改为国内源
#BREW_REPO = "https://github.com/Homebrew/brew".freeze
BREW_REPO = "git://mirrors.ustc.edu.cn/brew.git".freeze
2.brew install 加速
cd "(brew --repo)/Library/Taps/homebrew/homebrew-core" && git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile && source ~/.bash_profile
3.done
brew update