Cannot execute Binary file: Exec format error

Asked

Viewed 8,204 times

1

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

Cannot 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.

Look at:

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 conflict of bits No? And if that’s not how I can fix it?

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

1 answer

1


Cannot 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 Mach-O which is specific to OS X. The default executable format that Ubuntu uses (and Linux in general) is the ELF.

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.