HomeBrew 执行加速

背景

日常使用 brew install 相关软件时,真的是感觉蜗牛一般的速度,哪怕挂了代理依然也很慢,今天记录下在网上
网友提供的加速方案,配置之后速度快乐很多,心情也愉悦了!

更新源
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
$ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
修改环境变量
$ vim ~/.zshrc
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
测试更新
$ brew update
还原源
$ git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
$ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
$ brew update


mac     

本博客所有文章除特别声明外,均采用 CC BY-SA 3.0协议 。转载请注明出处!