10

I have Ubuntu 16.04.2 LTS installed on an arm64 server:

# uname -a
Linux test 4.9.23-std-1 #1 SMP Mon Apr 24 13:18:14 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux

I ran the following command to enable armhf package installation:

# dpkg --add-architecture armhf

I then installed the traceroute package:

# apt-get install traceroute:armhf
Reading package lists... Done
Building dependency tree
[...]
Preparing to unpack .../traceroute_1%3a2.0.21-1_armhf.deb ...
Unpacking traceroute:armhf (1:2.0.21-1) ...
Processing triggers for man-db (2.7.5-1) ...

However, I cannot launch the executable:

# traceroute
-bash: /usr/sbin/traceroute: cannot execute binary file: Exec format error

Further information:

# file /usr/bin/traceroute.db
/usr/bin/traceroute.db: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV),
    dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux
    2.6.32, BuildID[sha1]=0ebd0553e26b163dd848c131fe8ee0a4a2409109, stripped
# ldd /usr/bin/traceroute.db
        not a dynamic executable

I also tried installing binfmt-support and confirming that the binfmt_misc module was loaded.

Isn't arm64 backwards-compatible with armhf? How can I run armhf executables on an arm64 server?

  • Apparently all the dependencies as well as the interpreter need to be 32-bit as well – You'reAGitForNotUsingGit Jun 27 '17 at 16:51
  • Do you performed apt-get update; apt-get upgrade after dpkg --add-architecture armhf? – Marcos Silveira Jun 27 '17 at 18:32
  • @MarcosSilveira yes, no difference. – Nathan Osman Jun 27 '17 at 18:47
16
+200

Arm32 support is optional on arm64. In practice, there is only one arm64 CPU that omits legacy arm32 instruction set support - Cavium ThunderX. From the kernel version string, it seems you are using Scaleway armv8 servers. If this is the case, you are out of luck - Scaleway armv8 servers are based on ThunderX. Use the Scaleway C1 instead, which is native arm32.

| improve this answer | |
  • 2
    Good guess, I am using Scaleway. Thanks for the clarification. – Nathan Osman Jun 27 '17 at 19:06
  • 1
    Packet's Type 2A server is also ThunderX based and is also subject to this restriction. – vielmetti Jun 28 '17 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.