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)

Most upvoted comments

I think rustup self uninstall does remove both ~/.cargo and ~/.rustup. @maxcli can you try calling /home/pi/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc again and see what’s the output?

Additionally, you can try using file or ldd on /home/pi/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc and 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.