Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to execute a file it keeps giving me cannot execute binary fileerror

myfile Permission: 777

Running file myfile

myfile: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

How can I run this file on mac or raspbian or what library am I missing?

share|improve this question
    
You cannot run the same file on a OS X ( Intel x86-x64 ) and Raspbian ( ARM ) system. More information is required. –  Ramhound Nov 14 '13 at 11:56
add comment

1 Answer 1

up vote 3 down vote accepted

You cannot.

The file is compiled for a Linux environment, as is made clear by the sentence for GNU/LINUX 2.6.18, and the reason is that it uses shared libraries. This rules out a Mac, because, even though there are certainly MAC models running on Intel 80386 chips, none uses the Linux shared libraries.

On the other hand, though you may have a Linux distro installed on the Raspberry Pi (Debian or Arch, or ...) the cpu architecture for which this file has been compiled is Intel 80386, which differs greatly from the ARM architecture appropriate to the Raspberry Pi cpu.

You will have to search for versions of this program which have been ported to different environments. The Pi's repos provide exactly this kind of functionality, i.e., a collection of programs typical of Linux, but recompiled to run on an ARM architecture. With Mac, the operating systems being different, you may end up searching for a different program, performing the same tasks.

share|improve this answer
    
Thanks for the answer I'll have to put this on our other server as it is only compiled for GNU/Linux –  DouglasDC3 Nov 14 '13 at 12:40
    
@DouglasDC3 Let's just hope it has been compiled to work with a version of the shared libraries which is compatible with the one you have on your other system... –  MariusMatutiae Nov 14 '13 at 12:58
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.