更换brew 源
替换 Homebrew
1 | git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git |
替换 Homebrew Core
1 | git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git |
替换 Homebrew Cask
1 | git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git |
替换 Homebrew-bottles
- 对于 bash 用户:source ~/.bash_profile
1
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
- 对于 zsh 用户:
1
2echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc