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
have an app that I'm building that gives instructions to "install rust", and links to the rustup site.
I ran this as instructed:
curl https://sh.rustup.rs -sSf | sh
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
warning: It is recommended that rustup be the primary Rust installation.
warning: Otherwise you may have confusion unless you are careful with your PATH
warning: If you are sure that you want both rustup and your already installed Rust
warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
warning: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed
rustup's idea of what rust is, not installed, because of "some other" rust and no idea how to fix that above error.
solution:
emit this message instead:
"Would you like to uninstall the system-provided/older rust and use a newer one?" run 'sudo apt remove rustc' or similar for your platform
Notes
No response
The text was updated successfully, but these errors were encountered:
No, it's not necessary for you to remove the system-provided Rust. Looking at the user guide you can see that it's possible for those Rust installations to coexist (and for Rustup to adopt the system toolchain), but the PATH must be modified in such a way that Rustup's cargo shim precedes the original cargo, etc.
That's exactly the meaning of the phrase
It is recommended that rustup be the primary Rust installation. Otherwise you may have confusion unless you are careful with your PATH.
I would be happy to accept potential wording improvements based on this point :)
'You appear to have a rust installed with your package-manager. Usually there's no need for two versions of rust, but the one we're about to install is almost certainly newer.. More details about co-existing in the user-guide at https://rust-lang.github.io/rustup/installation/already-installed-rust.html
Would you like us to first remove the older one first? Y/n"
[If they say 'n', maybe point out the directories of both, and which one is first-in-their-path right now]
.. and why does it matter? ... because 'rustup' binary is not provided in the older/bundled build.
Thanks! I get your point. However, apart from having installed rust from the system package manager, this error can also occur when you run rustup-init and you already have an existing Rustup installation, whether via the system package manager or via a manual installation. From Rustup's point of view we should give general directions instead of directly helping the user out, but indeed it would be nice if we can point out several common possibilities.
Problem you are trying to solve
have an app that I'm building that gives instructions to "install rust", and links to the rustup site.
I ran this as instructed:
rustup's idea of what rust is, not installed, because of "some other" rust and no idea how to fix that above error.
Solution you'd like
I wanted it to install rust using rustup
after 10 minutes of googling this came up:
https://www.reddit.com/r/rust/comments/se7ecj/how_to_uninstall_rust_without_rustup/
rust-lang/rls#1399
#953
.. so its not just me..
solution:
emit this message instead:
"Would you like to uninstall the system-provided/older rust and use a newer one?" run 'sudo apt remove rustc' or similar for your platform
Notes
No response
The text was updated successfully, but these errors were encountered: