I'm trying to run a program, but an error happens like this:
bash: ./program: cannot execute binary file: Exec format error
The result of file program
was:
program: ELF-32-bit LSB executable, ARM, EABI4 version 1 (SYSV), dynamically linked(uses share libs), for GNU/LINUX 2.6.16, not stripped
How can I fix this error?
I'm using Ubuntu 14.04.2 (amd64) with VMware. I also tried with Ubuntu i386, but result was same.
Best Answer
You're trying to run an executable compiled for an ARM architecture on an x86-64 architecture, which is much like asking your processor who only speaks English to take directions in Chinese.
If you need to run that executable you have two choices:
Get an x86-64 version of the executable (by any mean; if you're unable to get an x86-64 version of the executable but you're able to get its source code, you can try to recompile it on the virtual machine);
Install Ubuntu Server for ARM in place of Ubuntu 14.04.2 (amd64). This requires either a physical machine running on an ARM architecture or a virtualization software that can emulate it.