小编Rig*_*ory的帖子

m1 mac 上的 `arch -x86_64 zsh` 内部做了什么?

我在尝试找到安装 m1 mac (darwin arm64) 之前出现的旧版本 npm 软件包的解决方法时遇到了这个命令

据我了解,这将尝试启动具有架构的 zsh 会话x86_64。(尽管arch再次运行会给我带来i386某种与x86_64我认为兼容的结果。)

但据我所知,架构在硬件中被定义为处理器芯片。要模拟不同的架构,您需要一些更重的软件,例如 virtualbox 或 qemu。

那么它arch -x86_64 zsh实际上是做什么的呢?它实际上模拟了不同的架构吗?

我尝试阅读这些man arch内容,但内容太多,我无法真正理解。

...
DESCRIPTION
     The arch command with no arguments, displays the machine's architecture type.

     The other use of the arch command is to run a selected architecture of a universal binary.  A universal
     binary contains code that can run on different architectures.  By default, the operating system will select …
Run Code Online (Sandbox Code Playgroud)

architecture zsh apple-m1

5
推荐指数
1
解决办法
6274
查看次数

标签 统计

apple-m1 ×1

architecture ×1

zsh ×1