解决brew update很慢

一般遇到这种问题,就跟墙有关啦,需要更换源。
用清华的源就非常好,去清华镜像的官网看一下说明,https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

$ cd /usr/local/Homebrew
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

$ cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

$ brew update

即可

复原

$ cd "$(brew --repo)"
$ git remote set-url origin https://github.com/Homebrew/brew.git

$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://github.com/Homebrew/homebrew-core

$ brew update

"$(brew --repo)" 这里填/usr/local/Homebrew



相关文章

最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比...
homebrew本身就是一个git仓库。使用homebrew安装软件包时,会...
一、Homebrew安装、卸载等命令Homebrew的安装和卸载都非常简...
在mac系统中,使用homebrew可以很方便的管理包。按照官网的说...
我按照说明从这里使用brew安装mysqlhttps://gist.github.com...
我在macOS10.12.4上安装了nginx1.10.3和php5.5.38作为开发服...