patternrustCritical
Is there a command to update Cargo to the latest official release?
Viewed 0 times
officialupdatethelatestreleasecargocommandthere
Problem
I seem to have diverging versions of
Is there a command akin to
for upgrading
rustc and cargo (I think), $ rustc -V
rustc 1.9.0 (e4e8b6668 2016-05-18)
$ cargo -V
cargo 0.10.0-nightly (10ddd7d 2016-04-08)
Is there a command akin to
pip install --upgrade pip
for upgrading
cargo? I.e. something likecargo install --upgrade cargo
Solution
You should update
I have the same versions of
If you really want to, you can download a nightly version of Cargo or compile your own. As long as your version exists in your
I used to do this with my local Rust builds in order to have a version of Cargo at all, although rustup now automatically uses the
rustc and cargo based on how you installed it. If you used rustup, a rustup update should suffice. If you used a package manager or a binary installer, check those sources for an update.rustc and cargo are shipped together, but that doesn't mean that their versions need to match. In fact, they do not match until Rust 1.26.0, when the Cargo binary was changed to print the Rust version.I have the same versions of
rustc and cargo that you do; those are the ones that correspond to the Rust 1.9 release. There's nothing to worry about.If you really want to, you can download a nightly version of Cargo or compile your own. As long as your version exists in your
PATH before the older one, it will be used.I used to do this with my local Rust builds in order to have a version of Cargo at all, although rustup now automatically uses the
cargo from the most recent stable version when there isn't one available in the current toolchain, which is nice.Context
Stack Overflow Q#37928591, score: 327
Revisions (0)
No revisions yet.