错误:无法以英特尔默认前缀 (/usr/local) 在 ARM 处理器上安装 Homebrew [英] Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)
问题描述
我使用最新的 Apple M1
芯片处理器.而且我在安装应用程序时不断出错.
I use the latest Apple M1
chip processor. And I keep getting errors while application installation.
说,
brew install openjdk@11
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
brew bundle dump
需要帮助以了解要遵循的确切步骤.
Need help with exact steps to follow.
推荐答案
不管怎样,在安装 Homebrew 之前,您需要为新的 ARM 芯片(M1 芯片)安装 Rosetta2 模拟器.我刚刚通过终端安装了 Rosetta2:
For what it's worth, before installing Homebrew you will need to install Rosetta2 emulator for the new ARM silicon (M1 chip). I just installed Rosetta2 via terminal using:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
这将安装rosetta2,无需额外点击按钮.
This will install rosetta2 with no extra button clicks.
在上面安装 Rosetta2 之后,您可以使用 Homebrew cmd 并安装 Homebrew for ARM M1 芯片: arch -x86_64/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
After installing Rosetta2 above you can then use the Homebrew cmd and install Homebrew for ARM M1 chip: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
安装 Homebrew for M1 ARM 后,使用 Homebrew 命令安装软件包:arch -x86_64 brew install <package>
Once Homebrew for M1 ARM is installed use this Homebrew command to install packages: arch -x86_64 brew install <package>
这篇关于错误:无法以英特尔默认前缀 (/usr/local) 在 ARM 处理器上安装 Homebrew的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!