Homebrew 镜像助手:https://brew.idayer.com/guide/change-source/
如果你是初次安装,并且需要换其他源
脚本默认内置中科大镜像,如果需要换源,请使用小助手获取安装脚本:
镜像:中科大,平台:MacOS,终端类型:zsh
# 1.执行安装脚本 export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git" export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git" /bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)" # 2.安装完成后设置 echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/bottles' >> ~/.zprofile source ~/.zprofile
如果你已经安装过,需要换源
选择”镜像”、”平台”、”终端类型”后,会自动生成对应的设置镜像脚本。
镜像:中科大,平台:MacOS,终端类型:zsh
# 脚本 git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git brew update echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/bottles' >> ~/.zprofile source ~/.zprofile