brew使用

137 阅读1分钟

==更换 Homebrew 源==

使用以下命令更换国内阿里云上的 homebrew 镜像:

替换 brew.git:

cd "$(brew --repo)"

git remote set-url origin

mirrors.aliyun.com/homebrew/br…

替换 homebrew-core.git:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin

mirrors.aliyun.com/homebrew/ho…

替换 homebrew-bottles:

echo 'export HOMEBREW_BOTTLE_DOMAIN=mirrors.aliyun.com/homebrew/ho…' >> ~/.zshrc source ~/.zshrc

替换 homebrew-cask.git:

cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask

git remote set-url origin

mirrors.ustc.edu.cn/homebrew-ca…


brew doctor 检查是什么原因不能下载

brew update --verbose