[2018-05-25][Rust] 러스트 때문에 시작한 삽질

telnet turtle·2022년 8월 9일
0

발단

우분투에 러스트를 깔아서 놀고있었다.

난 putty ssh로 접속해서 우분투를 쓴다. 그런데 새로운 세션을 열 때마다 cargo 나 rustc 명령어가 동작하지 않았다.
난 이걸(https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html) 보고 러스트를 깔았는데, 좀 읽다보면

The installation script automatically adds Rust to your system PATH after your next login. If you want to start using Rust right away instead of restarting your terminal, run the following command in your shell to add Rust to your system PATH manually:

$ source $HOME/.cargo/env

Alternatively, you can add the following line to your ~/.bash_profile:

$ export PATH="$HOME/.cargo/bin:$PATH"

라고 한다. 근데 안된다.

결론

~/.bashrc 의 가장 밑줄에

PATH=$PATH:$HOME/.cargo/bin

를 추가하고 셸을 다시 켜면 된다.

삽질

profile
프론트엔드 엔지니어

0개의 댓글