4

I'm trying to install gifski which is a dependency for gganimate.

I get this error.

------------------ RUST COMPILER NOT FOUND --------------------

Cargo was not found on the PATH. Please install cargo / rustc:

 - yum install cargo         (Fedora/CentOS)
 - apt-get install cargo     (Debian/Ubuntu)
 - brew install rustc        (MacOS)

Alternatively install Rust from: <https://www.rust-lang.org>

---------------------------------------------------------------

The yum install cargo command didn't work, so I installed Rust with

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

The installation prompt said I needed to add $HOME/.cargo/bin to my path environment variable, so I tried this.

$ source $HOME/.cargo/env
$ export PATH=$PATH:$HOME/.cargo/bin
$ export PATH=$PATH:/.cargo/bin
$ export PATH=$HOME/.cargo/bin

I reset my machine and I continue to receive the same error.

> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Amazon Linux AMI 2018.03
Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
ivan
  • 93
  • 6
  • Only `export PATH="$HOME/.cargo/bin:$PATH"` is needed. Did you do all 4 of those lines at once? – Shepmaster Apr 20 '19 at 02:05
  • 1
    *I reset my machine* — did you save the modifications to your `PATH` anywhere? rustup should have added the setup line to a file like `~/.profile`. If it didn't, or you undid the changes for some reason, then you'd have to re-set the environment in the shell before opening R. – Shepmaster Apr 20 '19 at 02:07
  • I did the lines separately. How do I save my modifications to path? – ivan Apr 20 '19 at 02:54
  • Possible duplicate of [How to permanently export a variable in Linux?](https://stackoverflow.com/questions/13046624/how-to-permanently-export-a-variable-in-linux) – hellow Apr 29 '19 at 05:28

0 Answers0