8

I have a binary executable that's a part of an academic software package I've downloaded. I can't seem to get it to run, and I don't have access to the source code. I've tried the following things. Any thoughts?

Many thanks.

$ chmod +x random_cell $ ./random_cell -bash: ./random_cell: cannot execute binary file $ file random_cell random_cell: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped $ ldd random_cell random_cell: is not an object file $ uname -m x86_64 

2 Answers 2

2

I ran into the same problem and this is the answer I came up with

$ ~/opt/Linux-3.11.0-i686/svn/bin/svn --version -bash: /home/fennellb/opt/Linux-3.11.0-i686/svn/bin/svn: cannot execute binary file $ file ~/opt/Linux-3.11.0-i686/svn/bin/svn /home/fennellb/opt/Linux-3.11.0-i686/svn/bin/svn: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x6b38ac5ac15af4334712b9bacc6646cabaefde9a, not stripped $ find /bin /usr/bin -maxdepth 1 -type f -print0 | xargs -0 file | awk 'BEGIN {c32=0;c64=0} /ELF 64-bit/ {c64++} /ELF 32-bit/ {c32++} END {print "ELF 32-bit count "c32; print "ELF 64-bit count "c64}' ELF 32-bit count 1639 ELF 64-bit count 0 

Well... that explains it!

Possible solutions: check to see if your CPU supports 64-bit Linux:

$ cat /proc/cpuinfo | egrep '^(model name|cpu MH|vend)' cpu MHz : 1200.000 model name : Intel(R) Pentium(R) Dual CPU E2140 @ 1.60GHz vendor_id : GenuineIntel 

(then Google the exact CPU name to find its specifications)

Then upgrade to a 64-bit Linux (if you can) - Download Ubuntu Desktop

One Alternative to run 64-bit code on 32-bit Linux is to use an true cpu emulator like qemu/bochs - Bochs - OSDev Wiki - with a 64-bit Linux image (or VM like xen if your CPU supports it).

Another is to ask your software provider to recompile for 32-bit.

(For me I am going to recompile from source.)

Sign up to request clarification or add additional context in comments.

Comments

0

Note the output of your file command:

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped 

That is saying the executable you're trying to run is compiled for the x86-64 architecture. If you're using a 32-bit operating system that won't run unless you recompile it for 32-bit.

Since you don't have the source code, I guess the easier solution would be to use a 64-bit Linux system to run it.

7 Comments

How do I tell if I'm running a 32 bit operating system? I think I should be on a 64 bit, but I'd be happy to check to be sure.
Oh.. wait. Now I see you used uname -m and it returned it is indeed a 64bit system: x86_64. Are you sure you set the execute bit on random_cell? Was it owned by your user?
I'm reasonably certain I've set the execute bit - $ ls -l random_cell -rwxr-xr-x@ 1 hippo staff 1048235 Jul 24 2012 random_cell
Hmm. Have you tried executing it starting another shell? Like sh random_cell?
Hmm.. so you're on a MAC. I supposed you were using Linux. Maybe that's the problem... if this binary is for 64-bit Linux it might not run on MAC (the MAC OS kernel is based on BSD unix, if I'm not mistaken). Well, I might be wrong about how much binary incompatible they are, but you should check that, its probably the reason it doesn't work for you (see on file response: for GNU/Linux 2.6.4).
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.