Skip to content

error: rustup is not installed at '/home/user/.cargo' when $RUSTUP_HOME is set to something other than the former #2886

@bbros-dev

Description

@bbros-dev

Problem

  1. Rustup cannot update when CARGO_HOME is not the Linux default ~/.cargo
  2. Then rustup self uninstall fails to work
  3. At https://www.rust-lang.org/tools/install, there are no further instructions, or a link to those instructions, on how to uninstall rustup.

Steps

20:02 $ echo $RUSTUP_HOME
/home/<snip>/.rustup
✔ ~/src/<snip> [port ↑·2|✚ 2…1]
20:02 $ echo $CARGO_HOME
/home/<snip>/.local/share/cargo
^[[A✔ ~/src/<snip> [port ↑·2|✚ 2…1]
20:02 $ which rustup
/home/<snip>/.local/share/cargo/bin/rustup
✔ ~/src/<snip> [port ↑·2|✚ 2…1]
20:02 $ rustup self update
error: rustup is not installed at '/home/<snip>/.cargo'

Possible Solution(s)
No idea. We seem to be in a Mexican-standoff.

Notes

Output of rustup --version:

$ rustup --version
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.56.0-nightly (5ad7389bd 2021-08-06)`

Output of rustup show:

20:14 $ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/<snip>/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.56.0-nightly (5ad7389bd 2021-08-06)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions