我有一台带有M1芯片的Mac电脑,我把它备份在外部硬盘上。我用备份来安装带有英特尔芯片的Mac。当我试图生锈rustup时,我得到以下信息:
$ rustup
zsh: bad CPU type in executable: rustup我试过使用this答复中的建议,但没有结果。
供参考:
$ cat /Users/user/.cargo/config
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]任何关于如何生锈和运行的建议将是非常感谢的。
发布于 2022-06-08 20:15:06
根据查尔斯·达菲的建议,我做了以下几点:
# Go to generated binaries
cd /Users/<username>/.cargo/bin
# Remove all of them
rm *
# Get a fresh rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n
# Add Mac Intel to target
rustup target add x86_64-apple-darwin
# Add Mac Intel to toolchain
rustup toolchain install stable-x86_64-apple-darwin
# Set Mac Intel toolchain as default
rustup default stable-x86_64-apple-darwin
# Run rustup update for good measure
rustup update希望这能有所帮助!
https://stackoverflow.com/questions/72548331
复制相似问题