Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I couldn't execute a fortran compiled code in ubuntu 11.10 32 bit.

Error message is

bash: ./filename : Cannot execute binary file.

I've installed the gcc and gfortran libraries too.

Could anyone help?

$ file um
um: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped 
share|improve this question
Please type file filename and report results. – January Sep 5 '12 at 9:46
filename is um.exe and result is bash: ./um cannot execute binary file – user87654 Sep 5 '12 at 9:52
That does not looks like a native Linux program. Try using wine. – Lekensteyn Sep 5 '12 at 9:54
this executable is compiled using a make file which compiles a set of fortran codes. this exe is made in fedora machine – user87654 Sep 5 '12 at 9:56
Please type file um.exe or file um (whichever is the name of your binary file). However, likely the generated binaries are for one reason or other Windows binaries. Also, if the program is public, you can post the link to the sources. Or just post the makefile here. – January Sep 5 '12 at 9:58

As you can see from the output of file um that you posted in a comment, your binary is a 64-bit binary.

32 bit systems cannot run 64 bit binaries, it only works the other way around.

share|improve this answer
This is the most common reason I've seen for this problem, using file will identify this quite quickly. – mikebabcock Nov 15 '12 at 14:38
So there is no solution to this? – JohnMerlino Jul 4 '14 at 3:38

Try making the file executable

chmod +x um.exe

Then try running it


But if this is a exe file compiled for Windows, you probably need to install Wine.

share|improve this answer

Another solution for people who are having this problem except the part about unmatched bits is that running the file without the command "bash".

Just use chmod +x 'path to the file' and then run 'the path to the file' in terminal.This is how I solved my problem.

share|improve this answer

Please post how did you compile that binary! It seems, that something has been misconfigured, and will not able to run on that machine.

Does that file run on the original machine, you complied it on?

I'll help you solve the compilation errors, just comment the answer!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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