How to execute a file built for armhf, i386, or amd64

I’d like to load the library by using CDLL on python.

I have library files(*.so) built for armhf, i386, amd64 only, but have no for arm64. Can I use the existing files on my arm64 Jetson Orin?

I tried below cmds, but The update has been blocked.

sudo dpkg --add-architecture i386
sudo apt-get update

if not blocked, will try;
sudo apt-get install libc6:i386 libstdc++6:i386

of course, tried armhf instead of i386, but same failure.

i386 and amd64 are completely different architectures. try to install libc6 for armhf. armhf may work if you install the suitable packages


sudo dpkg --add-architecture armhf
sudo apt-get update

but same, the update has been blocked.

Any idea to solve it?

Try to manually download the following and install it using dpkg

You would break your system if you forced these to install. They are as @b-sathishkumar mentioned different hardware architectures.

i386 is 32-bit PC. amd64 is 64-bit PC. armhf is 32-bit ARM with the E-ABI hardfloat option. Your system is 64-bit ARM (arm64/aarch64).

You could use an emulator/VM for this (performance would not be great).

It is worth noting that the 64-bit ARM CPUs have a 32-bit emulation mode which is a superset of the armhf. That superset is the 32-bit ARM with all optional extensions (naming the extension when using this breaks the program since on actual 32-bit ARM this is optional, but on compatibility mode 64-it ARM this is not an option, it is mandatory). The performance in this mode is terrible, but ignoring that, installing all of the needed user space libraries and linkers is itself a daunting task in comparison to using an emulator. Emulators themselves are not easy, and you would still need to install all of the linkers and libraries (but they wouldn’t interfere with the 64-bit system).

Really, the best bet, is if you can get the programs you are working with compiled for 64-bit ARM. If you have the source, but not the binaries, then you can quite often do so without too much pain. If it is an interpreted program, e.g., Python or Perl, then it wouldn’t be i386 or amd64, and would instead be “noarch”, so you already know the programs in question are compiled.

Incidentally, libc (in this case libc6 version) is the backbone of any *NIX clone, including Linux. This is part of the environment for an entire operating system. If you had a natively compiled version of the program, then it would use the existing libc6:arm64.

1 Like

Noted that the best way is to compile the library for arm64. As your advice, I’ve requested the supplier to compile new one. Now, only I can do is to hope they accept my request. Thank you so much!

If the source code is available, then it is often a simple matter to recompile it yourself even if the arm64 binary is not available.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.