Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
5  
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
2  
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
1  
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
show 1 more comment

2 Answers 2

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
1  
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 at 3:38
add comment

Try making the file executable

chmod +x um.exe

Then try running it

./um.exe

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

share|improve this answer
add comment

Your Answer

 
discard

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.