中科大镜像比较稳定,而且速度不错。
官方网站: http://mirrors.ustc.edu.cn/
搜索 brew ,然后点击 Help 即可查看用法:
➜ cd "$(brew --repo)"
➜ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
➜ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
➜ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
➜ brew update
➜ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
➜ source ~/.bash_profile
➜ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
➜ source ~/.zshrc
也是比较靠谱的开源镜像。
官方网站: https://mirror.tuna.tsinghua.edu.cn/help/homebrew/
➜ cd "$(brew --repo)"
➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
➜ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
➜ brew update
➜ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-science"
➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-science.git
➜ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-python"
➜ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-python.git
➜ brew update
➜ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
➜ source ~/.bash_profile
➜ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
➜ source ~/.zshrc
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:Homebrew 换源