- 更换国内镜像,提高安装速度
#下载homebrew安装脚本 curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install #切换国内镜像 替换下载的brew_install脚本中的 BREW_REPO = “https://github.com/Homebrew/brew”.freeze 为 BREW_REPO = “https://mirrors.ustc.edu.cn/brew.git “.freeze
- 安装homebrew
ruby brew_install
- 更换国内镜像,提高homebrew下软件安装速度
cd "$(brew --repo)" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
- 安装brew-cask
brew install caskroom/cask/brew-cask cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
- 更新并检查安装
brew update brew doctor
来源:oschina
链接:https://my.oschina.net/u/1537498/blog/3097082