cargo
昨天工作得很好。今天我开始了一个新项目并且cargo build
工作了。但cargo run
似乎不起作用。
cargo run
error: could not execute process `rustc -vV` (never executed)
Caused by:
Bad CPU type in executable (os error 86)
知道发生了什么吗?我使用的是配备 intel 芯片和 Ventura OS 的 2018 Mac
我尝试过 - Mac Intel:zsh:可执行文件中的 CPU 类型错误:rustup 但它不起作用
当尝试运行或编译不是为 ARM 架构构建的软件时,通常会在 Apple M1 Mac 上发生该错误。要解决此问题,您可能需要安装 Rosetta 2,它允许您运行为 Apple Silicon 上的英特尔处理器构建的应用程序:
softwareupdate --install-rosetta
# Or to skip the license:
softwareupdate --install-rosetta --agree-to-license