1.下载brew
国外
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
国内
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
2.写入环境变量
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
3.更新环境变量
eval "$(/opt/homebrew/bin/brew shellenv)"
4.立即刷新终端
source ~/.zprofile