前言,在我国作程序员有天生的劣势,主要分为
语言
和网络环境
。git点到即止,
brew update
真心慢的一批程序员今天鄙人有幸分享一下如何让电脑上的 homebrew 加速起飞github
鄙人用的是清华大学镜像站shell
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
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
复制代码
打开你正在使用的shell配置文件
,例如:.zshrc
网络
在文件中合适位置(你看哪里顺眼加哪里,无所谓)加入如下变量url
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
复制代码
再试试 brew update
, 是否是单车变摩托spa