Skip to content

Homebrew ​

安装 ​

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

终端配置 ​

安装完成后,按安装程序输出的 Next steps 配置 Shell 环境。Apple Silicon 默认安装路径为 /opt/homebrew。

使用 Zsh 时,在 ~/.zshrc 中添加:

bash
eval "$(/opt/homebrew/bin/brew shellenv)"

重新加载配置并验证:

bash
source ~/.zshrc
brew --version

安装路径不同时,以安装程序输出的路径为准。

基于 MIT 许可发布