在 Apple M1 上的 Rust 工具链上找不到“cargo”二进制文件

问题描述 投票:0回答:2

当我重写

rustup
工具链以使用 repo 目录中的
rust-toolchain
时,出现此错误:

error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.69.0-aarch64-apple-darwin' toolchain

rustup show
的内容:

❯ rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/myhome/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
stable-x86_64-unknown-linux-gnu
nightly-2022-11-04-aarch64-apple-darwin
1.67.0-aarch64-apple-darwin
1.67.0-x86_64-unknown-linux-gnu
1.67.1-aarch64-apple-darwin
1.68.0-aarch64-apple-darwin
1.69.0-aarch64-apple-darwin

active toolchain
----------------

1.69.0-aarch64-apple-darwin (overridden by '/Users/myhome/myrepo/rust-toolchain')
rustc 1.69.0 (84c898d65 2023-04-16)

rust 工具链文件:

1.69.0

我的Mac:

有谁知道会发生什么吗?

rust apple-m1 toolchain rustup
2个回答
0
投票

您可以尝试以下命令吗:

rustup component remove cargo
rustup component add cargo

参考:https://github.com/rust-lang/rustup/issues/2704


-1
投票

试试这个:

rustup component add cargo

© www.soinside.com 2019 - 2024. All rights reserved.