rustup: cannot run rustc on Raspberry PI
Problem
Using Raspberry PI 4 with Raspbian GNU/Linux ver 11 I installed Rustc : curl https://sh.rustup.rs/ -sSf | sh I have /home/pi/.cargo/bin in my path
pi@rpi4:~ $ rustc –version error: command failed: ‘rustc’: No such file or directory (os error 2)
note : I installed rustup after I installed rust
Any suggestions ?
Steps
curl https://sh.rustup.rs/ -sSf | sh rustc –version
Possible Solution(s)
No response
Notes
No response
Rustup version
1.26.0 (5af9b9484 2023-04-05)
Installed toolchains
pi@rpi4:~ $ rustup show
Default host: aarch64-unknown-linux-gnu
rustup home: /home/pi/.rustup
stable-aarch64-unknown-linux-gnu (default)
(error reading rustc version)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (4 by maintainers)
I think
rustup self uninstalldoes remove both ~/.cargo and ~/.rustup. @maxcli can you try calling/home/pi/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustcagain and see what’s the output?Additionally, you can try using
fileorlddon/home/pi/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustcand see what happens.Since you’ve mentioned “I installed rustup after I installed rust”, where is your previous rust installation located and how is it installed?
And there might be ambiguity in your issue: you said you
installed Rustc : curl https://sh.rustup.rs/ -sSf | sh, however this command will actually download and run rustup.