如果你没有更换过镜像源,执行 brew 命令安装应用的时候,跟以下 3 个仓库地址有关:
-
brew.git
-
homebrew-core.git
-
homebrew-bottles
通过以下操作将这 3 个仓库地址全部替换为 阿里云 提供的地址
cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git brew update brew config