When I run the command


I get the error:

bash: ./program: cannot execute binary file: Exec format error

When I run uname -a I get:

4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:34:49 UTC 2016 i686 i686 i686 GNU/Linux

Also I checked the information about the program that I was trying to run and I got:

ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=c154cb3d21f6bbd505d165aed3aa6ed682729441, not stripped

/proc/cpuinfo shows

flags       : fpuvme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts

How can I run the program?


You have a 64-bit x86 CPU (indicated by the lm flag in /proc/cpuinfo), but you’re running a 32-bit kernel. The program you’re trying to run requires a 64-bit runtime, so it won’t work as-is.

If you can find a 32-bit build of the program (or build it yourself), use that.

Alternatively, you can install a 64-bit kernel, reboot, and then install the 64-bit libraries required by your program.

To install a 64-bit kernel, run

sudo dpkg --add-architecture amd64
sudo apt-get update
sudo apt-get install linux-image-generic:amd64

This will install the latest 64-bit Xenial kernel, along with various supporting 64-bit packages. Once you reboot, you should find that uname -a shows x86_64 rather than i686. If you attempt to run your program again, it might just work, or you’ll get an error because of missing libraries; in the latter case, install the corresponding packages (use apt-file to find them) to get the program working.

| improve this answer | |
  • Just for completeness, suggest something like "a 64 bit CPU can run 32 bit binaries fine, but not the other way around. OP has a 64 bit-capable CPU but is limited by running a 32 bit kernel." your choice to add, if it helps. – Criggie Oct 29 at 4:11

You have a 32-bit CPU (x86) and are trying to run a 64-bit executable (x86_64). You can't run that executable on that CPU. Either find a 32-bit build or compile the source yourself.

| improve this answer | |
  • 6
    I'm afraid your answer is incorrect; the CPU is 64-bit capable, as evidenced by the lm flag in cpuinfo. Based on the information we have, the OPs problem is 100% a software problem, not hardware. – marcelm Oct 28 at 20:13

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.