Ask / Submit

Rust installer: armhf vs aarch64

asked 2019-07-07 13:35:03 +0300

bomo gravatar image

I am trying to use the official and recommended way to installed rust:

curl -sSf | sh

However, this fails with

$ curl -sSf | sh
info: downloading installer
sh: /tmp/tmp.DQjhE17803/rustup-init: /lib/ bad ELF interpreter: No such file or directory

My guess is that this is because uname -m reports aarch64 but there is no corresponding ld lib:

$ ls -lah /lib/ld-linux*
lrwxrwxrwx 1 root root 10 Mar 28 02:56 /lib/ ->
lrwxrwxrwx 1 root root 24 Mar 28 02:56 /lib/ -> /lib/

What exactly is wrong here? Is this an issue with the rust installer or an inconsistency in SFOS?

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted

answered 2019-07-07 16:30:01 +0300

Maus gravatar image

SFOS comes with a 32 bit userland, regardless of the platform CPU being 32 or 64 bit capable. You should therefore install a 32 bit version of Rust on your device. The Rust people have an armv7hf installer for this purpose.

edit flag offensive delete publish link more

answered 2019-07-07 14:45:23 +0300

Edz gravatar image

updated 2019-07-07 14:46:49 +0300

Originally posted as a comment, but contains too many characters, so is posted as a 'non-answer'...

Installs on my Jolla1, albeit, the component downloads failed several times, but eventually all succeeded and I got the message that "rust is installed now, great!"

Welcome to Rust!

This will download and install the official compiler for the Rust programming
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin
directory, located at:


This path will then be added to your PATH environment variable by modifying the
profile files located at:


You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: armv7-unknown-linux-gnueabihf
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation

info: syncing channel updates for 'stable-armv7-unknown-linux-gnueabihf'
info: latest update on 2019-07-04, rust version 1.36.0 (a53f9df32 2019-07-03)
info: downloading component 'rustc'
 75.2 MiB /  75.2 MiB (100 %)  41.3 MiB/s in  2s ETA:  0s
info: downloading component 'rust-std'
 65.0 MiB /  65.0 MiB (100 %)  43.6 MiB/s in  1s ETA:  0s
info: downloading component 'cargo'
  4.2 MiB /   4.2 MiB (100 %)   1.1 MiB/s in  4s ETA:  0s
info: installing component 'rustc'
 75.2 MiB /  75.2 MiB (100 %)   2.5 MiB/s in 32s ETA:  0s
info: installing component 'rust-std'
 65.0 MiB /  65.0 MiB (100 %)   3.3 MiB/s in 23s ETA:  0s
info: installing component 'cargo'
  4.2 MiB /   4.2 MiB (100 %)   2.8 MiB/s in  2s ETA:  0s
info: default toolchain set to 'stable'

  stable installed - rustc 1.36.0 (a53f9df32 2019-07-03)

Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done automatically.

To configure your current shell run source $HOME/.cargo/env
edit flag offensive delete publish link more



A difference is that the JP1 is arm7l, instead of aarch64. @bomo, I don't know anything about Rust or its installer, but perhaps, as work-around, you could specify the installer you want a 32-bit environment?

Fuzzillogic ( 2019-07-07 15:09:07 +0300 )edit

@Fuzzillogic You are right, this is not only a question of platform (arm7hf vs aarch64) but of the OS. SFOS does not come with 64bit user space components (e.g. libraries) yet so you should always use 32bit for your software Installations (with rare exceptions), even on a 64bit kernel.

Maus ( 2019-07-07 16:08:13 +0300 )edit

@Edz, thanks. That indeed works. However, I am still puzzled why its not being detected correctly.

bomo ( 2019-07-07 18:22:28 +0300 )edit

It's not being detected automatically because they only look at the architecture of the kernel, reported by uname. Most 64bit architectures are upgrades from 32bit designs and happily run 32bit software. In their shell wrapper, they could have used something like file -L /proc/$$/exe | sed -e 's,.*ld-linux-\([a-z0-9]\+\)\..*,\1,' to find armhf but I bet this would break some other target.

Maus ( 2019-07-08 16:06:17 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2019-07-07 13:35:03 +0300

Seen: 315 times

Last updated: Jul 07 '19