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.寫入環(huán)境變量
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
3.更新環(huán)境變量
eval "$(/opt/homebrew/bin/brew shellenv)"
4.立即刷新終端
source ~/.zprofile