Skip to content
On this page

Homebrew换源


标签:linux/软件  

换源

备注

bash
export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git
export HOMEBREW_BOTTLE_DOMAIN=https://mirror.sjtu.edu.cn/homebrew-bottles/bottles
export HOMEBREW_NO_INSTALL_FROM_API=1
  • souce ~/.bashrc 后运行更新指令:
bash
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git

brew update
  • 需要使用 cask 的话,可再运行如下指令:
bash
brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-cask.git
  • 建议直接翻看交大源的文档,以查看最新教程
  • 更换源后 brew 的速度依然还是慢的(相较与其他包管理器),但是比官方源已经快太多了

Last updated: