安装
此方法不需要另外再配置镜像站
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/homebrew-core.git"
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/Homebrew/install@master/install.sh)"
复制以上脚本到终端中执行,提示后输入密码(隐藏)后回车,密码通过后自动安装。
安装完成后即可执行 brew update
进行更新。
终端配置:
执行 echo $SHELL
查看终端版本
- zsh 终端配置
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
- bash 终端配置
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
- 终端配置完成后执行:
source ~/.bash_profile
重新加载配置文件。
关闭用户数据分析:brew analytics off
卸载
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/Homebrew/install@master/uninstall.sh)"