Mac Updating Homebrew...卡住了

在Mac中使用brew install命令安装软件时出现 Updating Homebrew... 卡住的问题,原因是本机与镜像源的网络不通,或网速很慢。

我们要做的是,只需要确保已安装homebrew,更新镜像源就可以了。

我们执行 brew 命令安装软件的时候,跟以下 3 个仓库地址有关:brew.git、homebrew-core.git 和 homebrew-bottles。

通过以下操作替换这三个仓库地址即可。

1. 替换brew.git:

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

或者

git remote set-url origin https://github.com/Homebrew/brew.git

或者

git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

 

2. 替换homebrew-core.git:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

或者

git remote set-url origin https://github.com/Homebrew/homebrew-core.git

或者

git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

 

 

你可能感兴趣的:(Mac)