rustup:not found order
in VMware Linux centos 9
when I put “rustc --version”,I can get the version
but when I put "rustup install nightly",bash: rustup: not found command
rustup:not found order
in VMware Linux centos 9
when I put “rustc --version”,I can get the version
but when I put "rustup install nightly",bash: rustup: not found command
Would you like to share the command that you ran? Maybe even in which shell on which os?
Dear ylimis,
Please elaborate on your attempts and what you are trying to achieve
sorry
in VMware Linux centos 9
when I put “rustc --version”,I can get the version
but when I put "rustup install nightly",bash: rustup: not found command
It's seems like your toolchain isn't included in your environment. While using Centos, add the following line to your ~/.bashrc if you are using bash:
> export PATH="<your_rust_install_location>/.cargo/bin:$PATH"
If you are a different shell like ZSH, add it to your ~/.zshrc (or similar) file.
After that, open a new shell and see that the following command prints the correct path:
> which cargo
~/.cargo/bin/cargo
Now you can access all needed binaries like cargo, rustc, rustup etc
cheers
CentOS 9 isn’t EOL until May of 2027.
My bad, CentOS Stream isn't EOL indeed.
Actually, it can be done even more simply. Inside your .cargo
directory, there's an env
file. Just append to your .bashrc
or .zshrc
, etc. as a source
and it will override your current Cargo environment path if it hasn't already.
eg:
echo "source /home/ylimis/.cargo/env" >> /home/ylimis/.bashrc
This won't affect the system-wide Rust installation.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.