Appearance
换源
备注
- 科大源不是很稳定,推荐 homebrew镜像_homebrew下载地址_homebrew安装教程-阿里巴巴开源镜像站 (aliyun.com) 阿里源
- 但是配置方法还是用科大源提供的方法更稳
- 使用上海交大源:上海交通大学 Linux 用户组 软件源镜像服务 (sjtu.edu.cn)
- 修改
~/.bashrc或者其他方式 修改环境变量:
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 的速度依然还是慢的(相较与其他包管理器),但是比官方源已经快太多了