Timothy Leung
Timothy Leung

Reputation: 1465

Cannot execute binary file on ubuntu

http://csapp.cs.cmu.edu/public/labs.html Hi, I have downloaded the datalab from above link. And I would like to use the datalab compiler given by the site. However, I got the error : binary file cannot be executed.

I have tried sudo or su but still doesn't work. Is it because of the 64bits/ 32bits problems?

That file is named as dlc. And should be used like this ./dlc bits.c which check the syntax for my bits.c

Result using file :

 timothy@ubuntu:~/Desktop/15-213/datalab-handout$ file dlc dlc: ELF
 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
 (uses shared libs), for GNU/Linux 2.6.9, not stripped

Here is the result after using uname -a :

timothy@ubuntu:~/Desktop/15-213/datalab-handout$ uname -a
Linux ubuntu 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux

Upvotes: 0

Views: 8307

Answers (1)

Vaibhav Jain
Vaibhav Jain

Reputation: 3755

Please type file um.exe or file um (whichever is the name of your binary file).

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

32 bit systems cannot run 64 bit binaries.

Upvotes: 4

Related Questions