1). Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2). 镜像安装
获取install文件
打开https://raw.githubusercontent.com/Homebrew/install/master/install
, 将文件另存为brew_install文件。修改文件
#BREW_REPO = "https://github.com/Homebrew/brew".freeze
BREW_REPO = "https://mirrors.ustc.edu.cn/brew.git".freeze
- 在对应的brew_install目录执行命令
/usr/bin/ruby brew_install
- 更新命令
brew update