Raspberry Pi SAFE Thread

Can anyone help with installing rust on a raspberry pi.

After installing rust, using

curl --proto ‘=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

even when changing terminals
when I try to run cargo… I get…

cargo no such file or directory (os error 2)

GOT IT TO WORK :partying_face: :partying_face: :partying_face: :partying_face:

Google is your friend

  1. Download the installer as per the link above:

Code: Select all

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. When prompted select option “2) Custom installation”
  1. When prompted for “Default host triple?” enter “arm-unknown-linux-gnueabihf”

Other options are up to you, I selected “nightly” for the default toolchain, “complete” for the profile and “y” to update my PATH. And finally 1) to kick off the installation.

After that “cargo” works fine again.

from… Installing Rust on Pi 4, 32 bit Pi OS. - Raspberry Pi Forums


bumping this for the pi gang.
Instructions bit rusty after 2 weeks, have put them all in first post in this thread.

1 Like

I have an error on api / cli cross-compilation, with the last version :

Compiling cpufeatures v0.1.1
error[E0432]: unresolved import `libc::HWCAP_AES`
  --> /home/richard/.cargo/registry/src/github.com-1ecc6299db9ec823/cpufeatures-0.1.1/src/aarch64.rs:55:21
55 |               pub use libc::$hwcap;
   |                       ^^^^^^^^^^^^ no `HWCAP_AES` in the root
70 | / __expand_check_macro! {
71 | |     ("aes",  HWCAP_AES),  // Enable AES support.
72 | |     ("sha2", HWCAP_SHA2), // Enable SHA1 and SHA256 support.
73 | |     ("sha3", HWCAP_SHA3), // Enable SHA512 and SHA3 support.

Node compilation is ok though

Compiling on the raspberry pi was a success, though when it finally compiled test net 5.1 was released. :joy::joy::joy:

Will join the test net at some point soon.

… and want to test if I can put my node on my new external nvme 1TB drive.

1 Like

@Zoki How much time did it take ?

1 Like

Didn’t time it.

I will next time using the linux




real 76m33.145s
user 291m48.049s
sys 6m14.505s


It would be great if ever you have time in the next Testnet to share the compiled binaries :innocent:

I have tried to install rust on my RPi 4 with your guide, but it fails invariably with a memory allocation error when downloading rustc.

1 Like

I think the team did they were going to soon start including bins for pi.