本文介绍了如何在M1 Macbook的Rosetta 2下运行Homebrew安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用M1 MacBook.当我尝试安装Homebrew时,这是错误:

I'm on the M1 MacBook.This is the error when I try to install Homebrew:

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

Homebrew is not (yet) supported on ARM processors!
Rerun the Homebrew installer under Rosetta 2.
If you really know what you are doing and are prepared for a very broken experience you can use another installation option for installing on ARM:
  https://docs.brew.sh/Installation

那么我如何在Rosetta 2下重新运行Homebrew安装程序"?

So how do I "Rerun the Homebrew installer under Rosetta 2."?

推荐答案

从Homebrew github中的开发人员那里得到答案 https://github.com/Homebrew/brew/issues/9173

Got an answer from a developer in the Homebrew github https://github.com/Homebrew/brew/issues/9173

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

使用它来安装软件包:

arch -x86_64 brew install <package>

如果尚未安装Rosetta 2以在ARM Mac上模拟Intel CPU,则会出现错误arch: posix_spawnp: /bin/bash: Bad CPU type in executable.使用以下命令提示Rosetta 2安装:

If you have not yet installed Rosetta 2 to emulate Intel CPUs on ARM Macs, you will get the error arch: posix_spawnp: /bin/bash: Bad CPU type in executable. Prompt a Rosetta 2 installation with:

softwareupdate --install-rosetta

这篇关于如何在M1 Macbook的Rosetta 2下运行Homebrew安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 21:25