简体   繁体   中英

Cargo bin's not added to path ( fish shell )

I'm using the fish shell under MacOS X Capitan and after using rustup.rs I get the following message:

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. The next time I logged in Cargo was not in my PATH. I had to add it manually.

In my.config/fish/fish.config file I have a:

set -x PATH...

line where I had to manually add cargo bin's:

set -x PATH... .cargo/bin

  1. run the fish_add_path command

fish_add_path /home/your-username/.cargo/bin/

my path: fish_add_path /Users/aharo/.cargo/bin/
  1. restart terminal/shell
  2. Run rustc

Follow the steps

  1. Open file ~/.config/fish/config.fish ;
  2. Add the line set PATH $PATH ~/.cargo/bin ; and
  3. Restart fish terminal

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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