Can not execute binary file: Exec format error

1

I'm trying to run a code on Linux and I'm getting this message:

  

Can not execute binary file: Exec format error

I did some research and this could be because of the structure of my pc, but from what I see my pc has the right structure for the file I want to run.

See:

File NomeFile
NomeFile: Mach-O 64-bit x86_64 executable

uname -a
Linux ubuntu 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

If I'm not mistaken, it's not a bit conflict? And if that's not how I can solve it?

Obs : The executable I am trying to run was first programmed on Mac and was passed to Linux, I did not think it would be a problem since both work with Unix.     

asked by anonymous 17.09.2015 / 08:39

1 answer

1
  

Can not execute binary file: Exec format error

This message indicates that the file format you want to run is not used or supported by the operating system.

In your case, the file format is the Mach-O file that is specific to OS X . The default executable format that Ubuntu uses (and Linux at general ) is the ELF .

There are some tools that promise to help with conversion, such as objconv for example.

    
17.09.2015 / 15:32