Reputation: 625
I just installed racer
using cargo
. After installing it say this:
Installing /home/karthik/.cargo/bin/racer
warning: be sure to add `/home/karthik/.cargo/bin` to your PATH to be able to run the installed binaries
How do I do this? Googling didn't help. Also, Should I be setting a PATH
variable for cargo bin as well?
Edit: OS is Ubuntu 14.04 and I have super user access
Upvotes: 7
Views: 32978
Reputation: 435
There are two steps:
(1) Add the Cargo bin to your PATH
variable. You can run $ whereis cargo
to find the bin path, and then do $ sudo -H gedit /etc/environment
where you can add that new path section to your current PATH
variable. You will need to save and close the file (and you can ignore the error message in the terminal during the saving portion) in order for it to take effect.
(2) Run $ rustup component add rust-src
to download the necessary Rust source files for you.
At this point Racer should work properly.
This is based on the answer here.
Upvotes: 1
Reputation: 1306
You have to add the cargo bin path to your PATH
variable and set the RUST_SRC_PATH
in .profile
or .bash_profile
.
Related unix.stackechange question
Upvotes: 8