Error: 'cargo' is not installed for the toolchain

Somehow Cargo is not installed but when I try to install it it tells me that it already is...

$ cargo check
error: 'cargo' is not installed for the toolchain '1.43.1-x86_64-unknown-linux-gnu'
To install, run `rustup component add cargo --toolchain 1.43.1-x86_64-unknown-linux-gnu`
$ rustup component add cargo --toolchain 1.43.1-x86_64-unknown-linux-gnu
info: component 'cargo' for target 'x86_64-unknown-linux-gnu' is up to date

Any ideas? If not I will try uninstalling and installing Rust.

Looks like your installation is broken. Try rustup update or reinstall rustup.

rustup update was my very first reaction and did not help. Reinstalling did the trick.

Do you use intellij-rust? I had the same issue caused by it (issue). Removing the broken toolchain should be enough.

No, but my issue was solved by reinstalling anyway.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.