简体   繁体   English

生锈赛车的货物路径设置

[英]Cargo path setup for rust-racer

I just installed racer using cargo . 我刚用cargo安装了racer 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? 另外,我是否应该为货箱设置PATH变量?

Edit: OS is Ubuntu 14.04 and I have super user access 编辑:操作系统是Ubuntu 14.04,我有超级用户访问权限

You have to add the cargo bin path to your PATH variable and set the RUST_SRC_PATH in .profile or .bash_profile . 您必须将货物仓路径添加到PATH变量,并在.profile.bash_profile设置RUST_SRC_PATH

Related unix.stackechange question 相关的unix.stackechange问​​题

There are two steps: 有两个步骤:

(1) Add the Cargo bin to your PATH variable. (1)将货箱添加到PATH变量中。 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. 您可以运行$ whereis cargo来查找bin路径,然后执行$ sudo -H gedit /etc/environment ,您可以将新路径部分添加到当前PATH变量中。 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. (2)运行$ rustup component add rust-src为您下载必要的Rust源文件。

At this point Racer should work properly. 此时Racer应该正常工作。

This is based on the answer here . 这是基于这里的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM