我用的是最新的苹果M1芯片处理器。在安装应用程序时,我总是出错。

说,

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

需要帮助,知道具体的步骤。


当前回答

这一问题与新的macbook pro M1芯片

错误:无法在ARM处理器上的Homebrew中安装英特尔默认前缀(/usr/local)!

对于Resolve,请遵循以下步骤

Step1 $ brew包转储 步骤2 $ /bin/bash -c $(curl - ssl . exe https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” 步骤3 编辑以下文件

$ vi ~/。Bashrc或vi ~/.zshrc 在上面的文件中编辑下面的行

导出路径= / opt /组装/ bin:美元的道路

其他回答

运行此命令将解决问题

arch -arm64 brew install kotlin

首先运行这个命令:

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

然后它会问你一个问题,点击返回,然后等待安装完成。之后执行以下命令:

brew bundle dump

在终端上运行这个程序就能解决问题

eval “$(/opt/homebrew/bin/brew shellenv)”

所以我买了一台新的M1,搬到了那里。我把它拿回来,搬了回来。我收到了这个错误。发现我需要运行sudo rm -Rf /opt/homebrew重新安装brew后,让事情再次流动。M1上的16G内存并没有用英特尔使用的64G内存取代我的工作流程。

通过在终端应用程序的Utilities文件夹中启用使用Rosetta选项来临时修复。

然而,它将是伟大的,知道这个问题的实际解决方案使用本机的方式。