While executing : cargo +nightly install --git https://github.com/alexcrichton/wasm-gc --force in Ubuntu 18.04, is throwing
error: no such subcommand:
+nightly
My system has following nightly version
rustc 1.47.0-nightly
cargo 1.47.0-nightly install --git https://github.com/alexcrichton/wasm-gc --force
Even, above command throws similar error!
Cmd1 : rustup toolchain install nightly
Cmd2 : rustup update
Even after running these commands as suggested over communities, error isn't resolved. I'm new to rust & couldn't link cargo to installed nightly via rustup.
System Details
cargo version : 1.43.0
rustup version : 1.22.1 (b01adbbc3 2020-07-08)
Cmd 3:
which cargo : /usr/bin/cargo
which cargoprinting out/usr/bin/cargoindicates that it defaults to Cargo that you installed from your OS's package manager (apt).Invocations with the toolchain version like
cargo +nightlyare not a feature of Cargo, but rather Rustup. In fact, Rustup'scargois a link torustupthat then invokes the "real" cargo stored under.rustup/toolchains.The easiest way to solve this would be to uninstall the Cargo you obtained from Ubuntu repositories:
Otherwise, you could try to manipulate your
PATHsuch that/home/<your_username>/.cargo/bincomes before/usr/bin.If you do not have rustup installed yet, you need to install it.
Then configure rustup, you can set the config to default to start
Finally you can install specific version of rust, for instance nightly