Mac上Homebrew安装可通过下面这条命令完成 /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install caskroom/cask/brew-cask
1.替换homebrew bottles默认源 echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles’>> ~/.bash_profile source ~/.bash_profile
2.Homebrew镜像替换为中科大源(即brew update时所更新内容) cd $(brew --repo) git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd $(brew --repo)/Library/Taps/homebrew/homebrew-core git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
cd $(brew --repo)/Library/Taps/caskroom/homebrew-cask git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
brew update