错误[E0554]:#![功能]可能无法在稳定发布通道上使用无法使用货物安装赛车

2024-05-16

我正在尝试使用 Cargo 安装 Racer,所以我执行了命令cargo install racer在终端中并导致错误:

error[E0554]: #![feature] may not be used on the stable release channel
--> /home/rajkumar/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:47:34
|
47 | #![cfg_attr(feature = "nightly", feature(macro_vis_matcher))]
|                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
--> /home/rajkumar/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:48:34
|
48 | #![cfg_attr(feature = "nightly", feature(allow_internal_unstable))]
|                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0554`.
error: failed to compile `racer v2.1.10`, intermediate artifacts can be found at `/tmp/cargo-install5YWPWW`

Caused by:
Could not compile `scoped-tls`.

To learn more, run the command again with --verbose.

以下是我的 Rust 详细信息:

$rustc --version
rustc 1.30.0 (da5f414c2 2018-10-24)

> rustup --version 
rustup 1.14.0 (1e51b07cc 2018-10-04)

> cargo --version 
cargo 1.30.0 (36d96825d 2018-10-24)

以下是我的 opensuse 版本详细信息:

> cat /usr/lib/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20181029"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20181029"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20181029"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

为什么我无法使用 Cargo 安装 Racer?我错过了什么吗?


正如错误消息所述,您无法使用稳定的 Rust 编译该代码。您需要安装 nightly Rust,然后使用它来编译程序:

rustup install nightly
cargo +nightly install racer

也可以看看:

  • 如何使用夜间通道执行货物测试? https://stackoverflow.com/q/48593858/155423
  • 是否可以有多个共存的 Rust 安装? https://stackoverflow.com/q/22758779/155423
  • Rocket 需要最低版本的 Rust nightly,但已经安装了更高的稳定版本 https://stackoverflow.com/q/55230896/155423
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

错误[E0554]:#![功能]可能无法在稳定发布通道上使用无法使用货物安装赛车 的相关文章

随机推荐