分类
编程

mac上安装的brew如何加速,提速方法

由于homebrew 默认的源是在github,而大陆连接github非常的慢,所以提速的方法是修改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 update