Mac下 "brew update" 无响应的解决方案
2020-06-20 本文已影响0人
张三呢
一、进入到对应的目录
cd /usr/local/Homebrew
二、查看源
git remote -v
一般未修改,默认如下

三、修改源为清华镜像
依次执行
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
大概等几分钟就好了