Skip to content

Rustup not installed at [location] with different CARGO_HOME and RUSTUP_HOME #4892

Open

Description

@juliandevelops

Verification

Problem

Running rustup update does update the version but ends with error: rustup is not installed at [location of $RUSTUP_HOME].

I did check the RUSTUP_HOME and CARGO_HOME. They are set as follows:

  • $RUSTUP_HOME: custom/location/rustup/bin
  • $CARGO_HOME: custom/location/cargo/bin

Both are sitting at the same custom/location just with different suffices.

I did check the actual location and the error message is correct. The rustup binary itself is installed at $CARGO_HOME/rustup together with all the other binaries such as cargo, rust-analyzer and more.

In the $RUSTUP_HOME are the installed toolchains, but no binaries.

Steps

  1. Install rustup via rust installer (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  2. run rustup update
  3. Rustup update works but ends with error

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.29.0 (28d1352db 2026-03-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: the currently active `rustc` version is `rustc 1.96.0 (ac68faa20 2026-05-25)`

Installed toolchains

Default host: aarch64-apple-darwin
rustup home:  [redacted]

installed toolchains
--------------------
stable-aarch64-apple-darwin (active, default)

active toolchain
----------------
name: stable-aarch64-apple-darwin
active because: it's the default toolchain
installed targets:
  aarch64-apple-darwin

OS version

macOS 26.5.1 on Apple Silicon Chip

Activity

  1. rami3l commented on Jun 4, 2026

    @rami3l
    Member

    @juliandevelops Hello, thanks for posting this issue.

    Per your description I don't see anything wrong with your setup.

    In fact, manually overriding RUSTUP_HOME and CARGO_HOME is even the recommended way to test rustup in an isolated environment:

    > RUSTUP_HOME=home CARGO_HOME=home target/debug/rustup-init --no-modify-path -y

    So the only conclusion that I can come up with is that you are probably running two instances of rustup, or the value of RUSTUP_HOME and CARGO_HOME overrides are not consistent when you installed rustup via rustup-init and when you run it later.

  2. added
    incompleteThe bug report does not have enough information
    and removed on Jun 4, 2026
  3. juliandevelops commented on Jun 4, 2026

    @juliandevelops
    Author

    @rami3l thanks for the quick response. I added my file structure below.
    I did notice, that cargo/bin does contain symlinks to the rustup/bin/toolchain/[toolchain]/bin, with exception of the Rustup binary which is located at $CARGO_HOME and does not link to rustup - which does explain the error.
    I can install rust again from scratch with those two values, but I don't think that's the issue as the location in the error message is correct. The fact is, that rustup is not installed at $RUSTUP_HOME but rather at $CARGO_HOME.

    And for me running two rustup instances, I don't think that's happening, I'm not aware of downloading multiple instances.

    Does that paint a clearer picture?
    Can I provide any more information?

    Image Image
  4. rami3l commented on Jun 4, 2026

    @rami3l
    Member

    @juliandevelops Your installation looks pretty standard.

    However there is one thing I would like to confirm: when rustup throws error: rustup is not installed at <path> it means it thinks that path doesn't exist (you can see the code here). This can also happen if you have tinkered the FS permissions for example. Try to run which rustup and see where it lands.

    Finally, since you are using macOS, the sandboxing mechanism can stop you as well.

    Try to see in the terminal if you can ls -lah your $CARGO_HOME/bin and see what output it generates, whether you have typos, etc.

  5. juliandevelops commented on Jun 6, 2026

    @juliandevelops
    Author

    @rami3l I didn't even consider this. That could be a reason.
    The output of which rustup points to $CARGO_HOME/rustup not $RUSTUP_HOME/rustup.

    ls -lah in $CARGO_HOME provides a normal looking directory (see attached screenshot)

    Image

    It provides a default owner (me - just as excepted) and a default group of staff.
    The permissions do also look normal. rustup is allowed to be executed and also written by myself.

    Another thing I did notice: You wrote $CARGO_HOME/bin. The /bin is part of my $CARGO_BIN. Same with $RUSTUP_HOME. Could that be a problem?

  6. rami3l commented on Jun 7, 2026

    @rami3l
    Member

    @juliandevelops The current rustup version installs itself under $CARGO_HOME/bin and assumes full ownership of $RUSTUP_HOME plus $CARGO_HOME.

    What is the $CARGO_BIN variable you are talking about? I'm not aware of its existence, sorry 🙏

    I'm also not aware of any $CARGO_HOME/rustup or $RUSTUP_HOME/rustup existing. $CARGO_HOME/bin/rustup is all I know here.

    Also, could you anonymize your $CARGO_HOME and $RUSTUP_HOME values and send it here?

  7. rami3l commented on Jun 7, 2026

    @rami3l
    Member

    Another thing I did notice: You wrote $CARGO_HOME/bin. The /bin is part of my $CARGO_BIN. Same with $RUSTUP_HOME. Could that be a problem?

    @juliandevelops Okay I've got it I think. My guess is that you have installed rustup under $FOO as $CARGO_HOME then running it using CARGO_HOME=$FOO/bin. This means:

    the value of RUSTUP_HOME and CARGO_HOME overrides are not consistent

    In that case it's perfectly normal for you to have that error, and uninstalling rustup with the wrong value and installing it again with the correct value should solve the problem for you.

  8. juliandevelops commented on Jun 8, 2026

    @juliandevelops
    Author

    @rami3l I actually meant the $CARGO_HOME, sorry, $CARGO_BIN does not exist.
    That sound plausible, I will try that, many thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    incompleteThe bug report does not have enough informationquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions