Install command in linux


#1

install rust using "$ curl https://sh.rustup.rs -sSf | sh"
on my fedora box gave me errors which was mentioned in the documentation.
DO YOU NEED TO HAVE ROOT ACCESS TO
INSTALL RUST WITH ITS PLUGINS?


#2

Without seeing the error, it’s going to be hard to say what’s wrong.


#3

No need to shout :wink: and no, you don’t need root access.

Just to be sure, when you say:

The $ is the prompt, the command to run is only:

curl https://sh.rustup.rs -sSf | sh


#4

I did not copy & paste all of it but here is my output at the shell command :
Here is my output:

####################################################################

  1. Proceed with installation (default)
  2. Customize installation
  3. Cancel installation

info: syncing channel updates for 'stable-i686-unknown-linux-gnu’
143.1 KiB / 143.1 KiB (100 %) 47.5 KiB/s ETA: 0 s
info: downloading component 'rustc’
49.0 MiB / 49.0 MiB (100 %) 92.8 KiB/s ETA: 0 s
info: downloading component 'rust-std’
58.4 MiB / 58.4 MiB (100 %) 92.8 KiB/s ETA: 0 s
info: downloading component 'cargo’
4.0 MiB / 4.0 MiB (100 %) 108.8 KiB/s ETA: 0 s
info: installing component 'rustc’
info: installing component 'rust-std’
info: installing component 'cargo’
info: default toolchain set to ‘stable’

stable installed - rustc 1.14.0 (e8a012324 2016-12-16)

Rust is installed now. Great!

**To get started you need Cargo’s bin directory in your PATH environment **
variable. Next time you log in this will be done automatically.

####################################################################

NOW THE PROBLEM IS WHAT DO I DO WITH adding the cargo bin directory?

Does this mean I open up a new terminal? OR do i restart the laptop OR do i need to edit the

~/.profile AND add the PATH environment variable because it
doesn’t include Cargo’s binary directory, ~/.cargo/bin


#5

So, as it says

Next time you log in this will be done automatically.

This works on most setups. That is, when you open a new shell, it will have loaded it into your PATH. You could do that by logging in and back out again, you could do this by closing all of your shells and opening new ones, you could do this by restarting your computer. What matters is, the current shell won’t work, but ones after that should.

If that fails for some reason, then you will need to do it manually. But on most setups, it should Just Work.