-
Notifications
You must be signed in to change notification settings - Fork 892
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
rustup: command not found after installation #686
Comments
I'm also getting the same. rdotdk@rdotdk-laptop ~ $ curl -sf https://static.rust-lang.org/rustup.sh | sudo sh
rustup: gpg available. signatures will be verified
rustup: downloading manifest for 'stable'
rustup: downloading toolchain for 'stable'
######################################################################## 100.0%
gpg: assuming signed data in '/home/rdotdk/.rustup/dl/f7decfef7346bba449da/rust-1.11.0-i686-unknown-linux-gnu.tar.gz'
gpg: Signature made Tuesday 16 August 2016 05:05:09 PM IST using RSA key ID 7B3B09DC
gpg: Good signature from "Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE
Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC
rustup: installing toolchain for 'stable'
rustup: extracting installer
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-i686-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'cargo'
Rust is ready to roll.
rdotdk@rdotdk-laptop ~ $ rustc -V
rustc 1.11.0 (9b21dcd6a 2016-08-15)
rdotdk@rdotdk-laptop ~ $ cargo -V
cargo 0.12.0-nightly (6b98d1f 2016-07-04)
rdotdk@rdotdk-laptop ~ $ rustup
rustup: command not found
rdotdk@rdotdk-laptop ~ $ uname -a
Linux rdotdk-laptop 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:34:49 UTC 2016 i686 i686 i686 GNU/Linux
rdotdk@rdotdk-laptop ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 18 Sarah
Release: 18
Codename: sarah
rdotdk@rdotdk-laptop ~ $ |
It looks like you are using Please follow the instructions at https://github.com/rust-lang-nursery/rustup.rs#installation to try |
i followed instructions from https://www.rustup.rs/ and it works. Thanks. |
Ahh. That makes sense. Thanks. |
Welcome to Rust! This will download and install the official compiler for the Rust programming It will add the cargo, rustc, rustup and other commands to Cargo's bin /home/kelvin/.cargo/bin This path will then be added to your PATH environment variable by modifying the /home/kelvin/.profile You can uninstall at any time with rustup self uninstall and these changes will WARNING: This is beta software. Current installation options: default host triple: x86_64-unknown-linux-gnu
|
In my case I needed to add |
@bsed when i input the number 1 to You can uninstall at any time with rustup self uninstall and these changes will
be reverted.
Current installation options:
default host triple: x86_64-apple-darwin
default toolchain: stable
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
1
info: aborting installation
do you get this error message ? do you know what i should do to install |
when i download You can uninstall at any time with rustup self uninstall and these changes will
be reverted.
Current installation options:
default host triple: x86_64-apple-darwin
default toolchain: stable
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
1
info: syncing channel updates for 'stable-x86_64-apple-darwin'
142.1 KiB / 142.1 KiB (100 %) 95.2 KiB/s ETA: 0 s
info: downloading component 'rustc'
4.1 MiB / 32.3 MiB ( 13 %) 35.2 KiB/s ETA: 821 s
|
Just a question, but why is |
After I type
I choose "1" and then I have
I just type |
This still is broken in Linux.Firstwhen you edit the .profile you should be putting.
Regardless of the *nix you should be setting up the system to check if the directory exists before setting up the path. Users do dumb things like delete directories and you don't need a Users .profile to have garbage in their path. Doing the following will do just that.
SecondYou should run the following as the very last thing the main() function does.
.profile is only evaluated after a login in most cases. Opening a terminal does not re-evaluate .profile that only happens after login. Since you can not always assume that there is a .bash_profile not all users run the same shell. In fact Ubuntu 17.10 is back to having dash as the default system shell, so there is not a .bash_profile at all. doing ether of those will ensure the current terminal session will a the very least have the new $PATH so users don't have log out and back in, or suddenly learn how to set their $PATH to use your program. ThirdThis is just a general question? why FourthFull disclosure. Absolutely not a Fan of the Rust programming language. Things like this are just bad practice which adds to my dislike even more. Having random users run a shell script from a URL. Whoa!!!! I guess security is not on your minds. You should be provide a package or download that the first thing it does is check it's self with a MD5 Checksum to ensure that your script wasn't altered along the way. Here's a design pattern. One of billions of ways to do it.
if you want ease of install; Users download and click on things. Don't move the cheese. Provide the super easy binary (write it in rust for pete's sake) , then also cater to the people in the know with a Please keep in mind that most users coming to rustup.rs are because of some random github project written in rust and they are not programmers. It seems the rust programming ethos has been lazy, which causes down stream laziness with README.md files with instructions like. go to rustup, clone my project, cd to project sort of instructions run some program then another. Whoops it broke on step one. rant over, I miss ./configure; make; make install. |
Seriously... this is a joke... this thing is still broken.... |
This issue was closed by the original author two years ago, and was an issue related to an entirely different project from this, so anything said here is not going to be seen by anyone. If you want to report a problem, commenting on an unrelated closed issue is not the best way to do that. If you're still having problems, please check the issue tracker for similar issues and if none exist open a new one. @josephRice thanks for the detailed write-up, but it would have received more attention if it had been on a relevant issue. To address your points:
Again, please see the previous discussions about this. You're running code you've downloaded from the internet, it makes zero difference whether that code is a shell script or a binary.
That would be completely pointless. If anyone was to alter the script along the way, the first thing they'd do is remove the MD5 checking. Currently we rely on HTTPS for our security: if someone is able to MiTM your HTTPS connection, then they could replace the entire The most secure option would be to install rust or rustup through your package manager: many distributions already provide packages for this, and rustup has several build options to make it easier for volunteers to provide those packages (such as disabling the self-update feature). Again, please see the previous discussions, blog posts, etc for a more complete discussions of the options.
As a windows user myself, I don't. |
I had to add the line |
It's still broken in Ubuntu 18.04.02 LTS. You can fix this manually with @Vallerious's solution. One more thing: Don't forget to reboot your bash. |
If you're using zsh, you might also need to add the following to export PATH="$HOME/.cargo/bin:$PATH" |
If you installed rust with |
This issue should be reopened. The latest version of rust (1.36.0 as of this comment) is not working. After installation on an i686 ChromeOS system, I get all zero byte binaries in
Also, why does the script download everything twice? Sorry for the rant. |
I tried this on the latest Debian 10, Buster, ended up No This whole thing didn't happen in ubuntu 18.04 though. It was smooth. also debian mate is getting treated as x86_64-unknown-linux-gnu. |
Any x86_64 based Linux on glibc will be called that. As for Debian vs. Ubuntu, I'm not sure what's going on there with bash :( if you can work it out, please open a fresh issue about it. |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
To configure your current shell run source $HOME/.cargo/env rustup --version 4.15.0-64-generic #73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
|
It's still broken in Ubuntu 19.10! |
Compare eg. with Golang... No pipe curl to .sh, to download binary,which binary then downloads data, ...JosephRice's "don't move the cheese" part was spot on. |
Following the steps at rustup and reloading the terminal with |
This worked for me on Ubuntu 18.04.
|
Ubuntu based systems @simanacci solution works fine. |
In Arch Linux I still had to add |
i wonder how can i fix it permanetly? both suggested solution above it fix temporary when i switch user or log out and still cargo not recognised |
@peterlymo please open a fresh issue if you're having difficulty and |
You are right, now in Debian we have a new special error when we try to run the following command like this:
My aim is to install suricata but I'm supprised why developers of suricata have to use this buggy script in order to install them. Starting from suricata 6 I've been facing a lot error in rustup... This thing is not so special to have in your Linux. I don't know why devs care so much to include this script. The only solution to install suricata without compiling from source (which has to use rustup for compiling from source) is to use the backport version in Debian but it has limited configs and a bit outdated version. |
On Fedora 34:
|
Restart the commands shell, or the operating system |
After installing rustup using the following:
the rustc and cargo commands work:
But rustup doesn't:
This is on Ubuntu 14.04 32 bit: i686-unknown-linux-gnu I believe.
The text was updated successfully, but these errors were encountered: