You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rustup not installed at [location] with different CARGO_HOME and RUSTUP_HOME #4892
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.
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)`
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.
@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?
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.
@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)
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?
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.
Activity
rami3l commentedon Jun 4, 2026
@juliandevelops Hello, thanks for posting this issue.
Per your description I don't see anything wrong with your setup.
In fact, manually overriding
RUSTUP_HOMEandCARGO_HOMEis even the recommended way to test rustup in an isolated environment:> RUSTUP_HOME=home CARGO_HOME=home target/debug/rustup-init --no-modify-path -ySo the only conclusion that I can come up with is that you are probably running two instances of rustup, or the value of
RUSTUP_HOMEandCARGO_HOMEoverrides are not consistent when you installed rustup viarustup-initand when you run it later.juliandevelops commentedon Jun 4, 2026
@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?
rami3l commentedon Jun 4, 2026
@juliandevelops Your installation looks pretty standard.
However there is one thing I would like to confirm: when
rustupthrowserror: 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 runwhich rustupand 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 -lahyour$CARGO_HOME/binand see what output it generates, whether you have typos, etc.juliandevelops commentedon Jun 6, 2026
@rami3l I didn't even consider this. That could be a reason.
The output of
which rustuppoints to$CARGO_HOME/rustupnot$RUSTUP_HOME/rustup.ls -lahin$CARGO_HOMEprovides a normal looking directory (see attached screenshot)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/binis part of my$CARGO_BIN. Same with$RUSTUP_HOME. Could that be a problem?rami3l commentedon Jun 7, 2026
@juliandevelops The current rustup version installs itself under
$CARGO_HOME/binand assumes full ownership of$RUSTUP_HOMEplus$CARGO_HOME.What is the
$CARGO_BINvariable you are talking about? I'm not aware of its existence, sorry 🙏I'm also not aware of any
$CARGO_HOME/rustupor$RUSTUP_HOME/rustupexisting.$CARGO_HOME/bin/rustupis all I know here.Also, could you anonymize your
$CARGO_HOMEand$RUSTUP_HOMEvalues and send it here?rami3l commentedon Jun 7, 2026
@juliandevelops Okay I've got it I think. My guess is that you have installed rustup under
$FOOas$CARGO_HOMEthen running it usingCARGO_HOME=$FOO/bin. This means: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.
juliandevelops commentedon Jun 8, 2026
@rami3l I actually meant the
$CARGO_HOME, sorry,$CARGO_BINdoes not exist.That sound plausible, I will try that, many thanks for the help!