无法构建 Rocket.rs: 给定的版本要求无效
Unable to build Rocket.rs: The given version requirement is invalid
我正在关注 the Rocket getting started guide 以学习 Rust 的 Rocket Web 框架。当我执行 cargo run --verbose
时,出现以下错误:
PS C:\Users\kin\Desktop\hello-rocket> cargo run --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
failed to parse registry's information for: serde
Caused by:
the given version requirement is invalid
系统详情
Desktop Environment: Windows 10
Cargo Version : cargo 0.8.0-nightly (28a0cbb 2016-01-17)
rustc Version : rustc 1.7.0 (a5d1e7a59 2016-02-29)
Cargo.toml
[package]
name = "hello-rocket"
version = "0.1.0"
authors = ["XXX"]
[dependencies]
rocket = "0.3.5"
rocket_codegen = "0.3.5"
I am following the Rocket getting started guide
very first section of the guide you linked 声明(强调我的):
Rocket makes abundant use of Rust’s syntax extensions and other advanced, unstable features. Because of this, we’ll need to use a nightly version of Rust.
稍后,它指出:
Rocket always requires the latest version of Rust nightly.
然而你有一个稳定版本的 Rust (1.7.0);一个此时 22 个月大 (2016-02-29)。 Rust 1.22.1 是当前 Rust 的稳定版本。
本指南继续介绍如何安装最新的 nightly;我建议关注它。
- 在您的 PC 中卸载 Rust 语言
- 前往 the Rust official website 下载并重新安装最新的 Rust。
我正在关注 the Rocket getting started guide 以学习 Rust 的 Rocket Web 框架。当我执行 cargo run --verbose
时,出现以下错误:
PS C:\Users\kin\Desktop\hello-rocket> cargo run --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
failed to parse registry's information for: serde
Caused by:
the given version requirement is invalid
系统详情
Desktop Environment: Windows 10
Cargo Version : cargo 0.8.0-nightly (28a0cbb 2016-01-17)
rustc Version : rustc 1.7.0 (a5d1e7a59 2016-02-29)
Cargo.toml
[package]
name = "hello-rocket"
version = "0.1.0"
authors = ["XXX"]
[dependencies]
rocket = "0.3.5"
rocket_codegen = "0.3.5"
I am following the Rocket getting started guide
very first section of the guide you linked 声明(强调我的):
Rocket makes abundant use of Rust’s syntax extensions and other advanced, unstable features. Because of this, we’ll need to use a nightly version of Rust.
稍后,它指出:
Rocket always requires the latest version of Rust nightly.
然而你有一个稳定版本的 Rust (1.7.0);一个此时 22 个月大 (2016-02-29)。 Rust 1.22.1 是当前 Rust 的稳定版本。
本指南继续介绍如何安装最新的 nightly;我建议关注它。
- 在您的 PC 中卸载 Rust 语言
- 前往 the Rust official website 下载并重新安装最新的 Rust。