如何卸载 Rosetta 的 Homebrew 并在 Mac Bigsu (M1) 上安装 Homebrew native

How to uninstall Homebrew of Rosetta and install Homebrew native on Mac Bigsu (M1)

之前我在MacOs M1上安装了Homebrew rosetta版本, 现在我看到 HomeBrew 有本机版本,那么如何删除 rosetta 上的 HomeBrew 并安装本机版本。 请帮我解决这个问题,谢谢

卸载 Homebrew 的 Rosetta 版本

运行 终端内的罗塞塔模式:

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

然后在终端内本地安装(没有 rosetta):

(在 https://www.youtube.com/watch?v=nv2ylxro7rM 的帮助下)

cd /opt
sudo mkdir homebrew
sudo chown -R $(whoami) /opt/homebrew
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

(如果您使用的是 zsh,请将 Homebrew bin 目录添加到 PATH)

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc