更换mac的brew源

2019-10-19  本文已影响0人  当时就吓死我了
替换 brew.git:

# cd到 Homebrew 目录
cd "$(brew --repo)"
# 换成阿里源
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
替换 homebrew-core.git:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
替换 homebrew-bottles: 二进制文件, 注意自己机器上使用的 SHELL

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
替换 homebrew-cask.git: cask 表示 GUI 应用的源, 阿里云没有提供 cask 源, 故使用 USTC 源

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

猜你喜欢

热点阅读