说明
由于homebrew 默认的源是在github,而大陆连接github非常的慢,所以提速的方法是修改homebrew 的源为国内源
步骤
打开macos 的终端,
替换git的源
$ 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
$ brew update
注意这里需要等待一会,因为要更新资源。
更新完后使用brew upda