Cannot execute binary

I have a binary executable file that I downloaded part of the training software package. It seems I can not start it, and I do not have access to the source code. I have 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 
+4
source share
2 answers

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!

Possible solutions: check if your processor 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 processor name to find its specifications)

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

One alternative for running 64-bit code on 32-bit Linux is to use a real cpu emulator like qemu / bochs - Bochs - OSDev Wiki - with a 64-bit Linux image (or a VM like xen if your processor supports it).

Another question is to ask your software provider to recompile the 32-bit version.

(For me, I'm going to recompile from the source.)

+1
source

Pay attention to the output of the 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 

This means that the executable you are trying to run is compiled for the x86-64 architecture . If you are using a 32-bit operating system that will not work, unless you recompile it for the 32-bit version.

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

0
source

Source: https://habr.com/ru/post/1495012/


All Articles