-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install rustup because of existing rust that I can't remove #953
Comments
I wonder why can't rustup have a special |
I'm not sure the best way to fix this offhand. I think the reason I did this was to reduce potential confusion after install, having seen cases where people were still invoking the old rustc afterwards. For example, there are many cases where rustup fails to configure PATH, and that would leave the old rustc active. We could possibly loosen this to a warning, like "warning: There is an existing Could also make it interactive, but that's deeper surgery. A 'system' toolchain is a useful feature to add, but does not solve the problem of users being confused about which toolchain they are using. |
Temporary workaroud (let's call it - force install) for this, is to download rustup.rs source code and comment sanity checks in diff --git a/src/rustup-cli/self_update.rs b/src/rustup-cli/self_update.rs
index 7d1a641..c289962 100644
--- a/src/rustup-cli/self_update.rs
+++ b/src/rustup-cli/self_update.rs
@@ -381,7 +381,7 @@ fn do_pre_install_sanity_checks() -> Result<()> {
warn!("it looks like you have an existing installation of Rust");
warn!("rustup cannot be installed alongside Rust. Please uninstall first");
warn!("run `{}` as root to uninstall Rust", uninstaller_path.display());
- return Err("cannot install while Rust is installed".into());
+ // return Err("cannot install while Rust is installed".into());
}
if rustup_sh_exists { Then compile ( |
The copy of |
You can bypass the check by setting
I think the error message should at least mention this environment variable -- I only found it after looking through the source of |
I meet the some question too, and I use $RUSTUP_INIT_SKIP_PATH_CHECK=yes sh ./rustup-init.sh to reinstall rust, It's work. Thanks @mgeisler |
Sorry for the late reply. You just need to run: it will fix the problem. |
@anjalianjali1234 This no longer works:(rustc1.3.0) $ curl -sSf https://static.rust-lang.org/rustup.sh | sh
The location of rustup.sh has moved.
Run the following command to install from the new location:
curl https://sh.rustup.rs -sSf | sh |
Just run:
|
@ssowellsvt one of the premises of this issue is that the user doesn't have root access and can't use But as @mgeisler pointed out, |
How it was removed? |
I don't know. Probably one of the admins removed it. |
https://doc.rust-lang.org/1.0.0/book/installing-rust.html
Please follow this link.
…On Thu, Jan 17, 2019 at 4:25 AM Michael Hewson ***@***.***> wrote:
I don't know. Probably one of the admins removed it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#953 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AgKDbJJMUwF5vmUhzS8ynn6RbEw0HmmZks5vD63xgaJpZM4L-YjL>
.
|
@anjalianjali1234 was that comment directed at me? I'm not sure what you're getting at. |
Anyway, it looks like the issue was fixed in #705. You can now add the |
Not sure what has happened, using
Is it possible to install |
tks! |
After compiling all above comments, I used following command and it worked perfectly with previously installed rust. |
@ssowellsvt - Spot on - Thanks! |
Yes, use
|
This worked for me |
On OSX, I had to manually go into |
@m-cat |
Same thing happened to me (OSX Big Sur, Intel Mac) after updating to either 1.56 or 1.57. Somehow I had the binaries also in after running |
If an existing rust installation is left there, is there a way to force |
@CMCDragonkai we attempt to do that when you accept the warning, but its not always possible depending on how you have your shell configured. |
We have a copy of rustc version 1.14.0 installed on my school's server. I want to set up the latest version of rust (currently 1.15.1) in my home directory, ideally using rustup. But because of the existing copy of rust - which I can't remove, since I don't have root access -
rustup-init
fails with the following error:The text was updated successfully, but these errors were encountered: