安装环境
macOS Catalina 10.15.7
安装参考
https://docs.brew.sh/Installation
安装步骤
1. 安装Command Line Tools (CLT) for Xcode
xcode-select --install
2.
sudo vim /etc/hosts
然后在hosts中添加
199.232.68.133 raw.githubusercontent.com
【注】:不做这一步的话,我遇到了curl failed问题,详见文章最后遇到的问题
3. 上面的编辑完成后,替换homebrew的默认源,这里用的是中科大的镜像: http://mirrors.ustc.edu.cn/
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"
4. 开始进行安装