美文网首页
Mac下 "brew update" 无响应的解决方案

Mac下 "brew update" 无响应的解决方案

作者: 张三呢 | 来源:发表于2020-06-20 22:32 被阅读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

大概等几分钟就好了

相关文章

网友评论

      本文标题:Mac下 "brew update" 无响应的解决方案

      本文链接:https://www.haomeiwen.com/subject/yoqnxktx.html