-
Notifications
You must be signed in to change notification settings - Fork 937
cargo and rustc are not found/executable in aarch64 Raspberry Pi OS #2498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It would appear that using the beta 64-bit file (https://www.raspberrypi.org/forums/viewtopic.php?t=275370) this doesn't happen, so this probably has to do with the 32-to-64 upgrade process (64-bit arch, 32-bit userland). Hopefully it won't resurface once the 64 bit version is in a fully-supported release. |
still the same problem in 2023 ... and I don't find any solution. |
@microfx This is a known bug already fixed in #3488 #3490. Unfortunately we are still working on the 1.27.0 release so this fix hasn't been shipped yet. For the time being you can manually change the host triple to 32-bit as described in #3342 (comment). |
I managed to fix it by typing the thing below and got a 64 bit result! Thanks for letting me know tho!
|
@microfx In that case you're probably running a 64-bit userland? Anyway, I'm glad to see that you have found a solution! |
Yes! This totally confused me when I searched for my solution.... |
Hello! I am trying to install and run 64-bit Rust on Raspberry Pi OS, upgraded to 64-bit kernel through 'sudo apt full-upgrade'. This is an RPi 4, the 8GB model.
What I am experiencing is almost exactly what is described here:
https://stackoverflow.com/questions/54738013/rust-musl-docker-image-cannot-find-cargo
Except of course I am on 64-bit ARM, of course.
the same errors:
$ rustc
error: command failed: 'rustc'
error: caused by: No such file or directory (os error 2)
$ cargo
error: command failed: 'cargo'
error: caused by: No such file or directory (os error 2)
This seems to be related:
#1282
As does this:
#2111
$ uname -s
Linux
$ uname -m
aarch64
$ dpkg --print-architecture
armhf
So, I get rustup:
$ rustup --version
rustup 1.22.1 (b01adbb 2020-07-08)
And that's all I get. I tried adding the target for the appropriate 32-bit toolchain, but I only got so far with it (I'm pretty new to rust--I'm installing it so that I can run a separate project that needs it, I don't code in Rust)
rustup show
Default host: aarch64-unknown-linux-gnu
rustup home: /home/pi/.rustup
installed toolchains
stable-aarch64-unknown-linux-gnu (default)
1.43.1-aarch64-unknown-linux-gnu
installed targets for active toolchain
aarch64-unknown-linux-gnu
arm-unknown-linux-gnueabi
active toolchain
stable-aarch64-unknown-linux-gnu (default)
(error reading rustc version)
So, I know that Raspberry Pi OS 64-bit is currently fairly bleeding-edge, and maybe this is an issue where for some reason the old 32-bit userland from legacy Raspbian is demanding a 32-bit executable, although rustup is correctly detecting the aarch64 environment and installing the correct package. Or maybe not, as has happened previously, and it's rustup that's screwing up somehow, installing the 32-bit when it should be installing 64-bit.
Any helpful suggestions as to how to figure out which of these two scenarios I'm faced with, I'd greatly appreciate.
Thanks!
The text was updated successfully, but these errors were encountered: