brew安装-mac m4 homebrew

安装arm版本homebrew

arm版homebrew最终安装在/opt/homebrew路径下,对应安装的软件都在/opt/homebrew/bin/下

直接执行

/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"

设置环境变量

在终端执行  echo $SHELL 获取终端类型

/bin/zsh => zsh => .zprofile
/bin/bash => bash => .bash_profile

若使/bin/zsh,从macos catalina(10.15.x)版本开始默认使用zsh作为默认shell

echo 'eval "$(/opt/homebrew/bin/brew shellenv)" #brew.idayer.com' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

若是/bin/bash

echo 'eval "$(/opt/homebrew/bin/brew shellenv)" #brew.idayer.com' >> ~/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"

 

posted @ 2025-08-21 14:39  白玉神驹  阅读(170)  评论(0)    收藏  举报