1、根据官网提示
https://brew.sh/
执行命令行
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homeb
rew/install/HEAD/install.sh)"
安装成功后依次执行
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
查看 安装成功