Mac brew 国内加速

1.brew 安装加速
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
将brew_install文件中的 BREW_REPO 修改为国内源
#BREW_REPO = "https://github.com/Homebrew/brew".freeze
BREW_REPO = "git://mirrors.ustc.edu.cn/brew.git".freeze

2.brew install 加速
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
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile && source ~/.bash_profile

3.done
brew update

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容