Mac 10.14.6安装 brew

Mac 10.14.6安装 brew

一、获取 install 文件

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

二、更改脚本中的资源链接
替换
BREW_REPO = “https://github.com/Homebrew/brew“.freeze

1
BREW_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git".freeze

三、运行脚本

/usr/bin/ruby brew_install

四、下载homebrew-core

到下载homebrew-core这步会失败
失败后运行以下命令clone git

1
git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

五、检查安装是否成功

brew doctor

六、添加清华大学镜像源

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles'>>   ~/.bash_profile

使其生效
source ~/.bash_profile


Mac 10.14.6安装 brew
http://ysocket.pages.dev/2020/05/14/install-brew-on-mac/
作者
YSocket
发布于
2020514
许可协议