homebrew升级的命令
shellbrew update-reset
查看当前下载源
shell# 查看brew.git当前源
cd "$(brew --repo)" && git remote -v
# 查看homebrew-core.git当前源
cd "$(brew --repo homebrew/core)" && git remote -v
替换homebrew下载源
shell# 替换brew.git:
$ cd "$(brew --repo)"
# 中国科大:
$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 替换homebrew-core.git:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
# 中国科大:
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
# 替换homebrew-cask.git:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
# 替换homebrew-bottles:
# 中国科大:
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
$ echo 'export HOMEBREW_BREW_GIT_REMOTE=https://mirrors.ustc.edu.cn/brew.git' >> ~/.bash_profile
$ echo 'export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.ustc.edu.cn/homebrew-core.git' >> ~/.bash_profile
$ source ~/.bash_profile
更新Homebrew使配置生效
shellbrew update
本文作者:whitebear
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!