Rustup: error: 'cargo' is not installed for the toolchain 'stable-x86_64-unknown-linux-gnu'

Created on 23 Sep 2019  ยท  1Comment  ยท  Source: rust-lang/rustup

Problem:
Cargo is unusable. Cannot build Mozilla Firefox or GNU IceCat - 'cargo --version --verbose' is part of the build process and fails.
$ rustup component add cargo
component 'cargo' for target 'x86_64-unknown-linux-gnu' was automatically added because it is required for toolchain 'stable-x86_64-unknown-linux-gnu'
Cargo still fails.

Reproduce:

  1. $ curl https://sh.rustup.rs -sSf | sh
  2. default install
  3. restart PC
  4. $ cargo --version #prints error from headline

Output of cargo version:
error: 'cargo' is not installed for the toolchain 'stable-x86_64-unknown-linux-gnu'

OS: Manjaro 18.1.0 Juhraya
Kernel: x86_64 Linux 5.3.0-1-MANJARO
shell: GNU bash, version 5.0.9(1)-release (x86_64-pc-linux-gnu)
CPU: Intel Core i3 530 @ 4x 3.078GHz
GPU: Mesa DRI Intel(R) Ironlake Desktop
$ rustup --version
rustup 1.19.0 (2af131cf9 2019-09-08)
$ which cargo
/home/pete/.cargo/bin/cargo
$ ls -al ~/.cargo/bin
total 133735
drwxr-xr-x 2 pete pete 3488 23 ัะตะฟ 16:12 .
drwxr-xr-x 5 pete pete 3488 22 ัะตะฟ 17:55 ..
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 cargo
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 cargo-clippy
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 cargo-fmt
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 cargo-miri
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 clippy-driver
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rls
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rustc
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rustdoc
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rustfmt
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rust-gdb
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rust-lldb
-rwxr-xr-x 12 pete pete 11401048 23 ัะตะฟ 16:12 rustup
$ ls -al ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin
total 8104
drwxr-xr-x 2 pete pete 3488 22 ัะตะฟ 20:25 .
drwxr-xr-x 6 pete pete 3488 22 ัะตะฟ 17:55 ..
-rwxr-xr-x 1 pete pete 2358016 22 ัะตะฟ 17:55 rustc
-rwxr-xr-x 1 pete pete 5919736 22 ัะตะฟ 17:55 rustdoc
-rwxr-xr-x 1 pete pete 604 22 ัะตะฟ 17:55 rust-gdb
-rwxr-xr-x 1 pete pete 1789 22 ัะตะฟ 17:55 rust-gdbgui
-rwxr-xr-x 1 pete pete 1245 22 ัะตะฟ 17:55 rust-lldb

bug

Most helpful comment

Solution found:
$ rustup uninstall stable
$ rustup install stable
Then reboot your PC or shell.

>All comments

Solution found:
$ rustup uninstall stable
$ rustup install stable
Then reboot your PC or shell.

Was this page helpful?
0 / 5 - 0 ratings