Cannot execute Linux binary file on MacBook Air M1

3.4k Views Asked by At

I have a third party library file compiled for Linux, when I tried to execute using terminal I get the error:
cannot execute binary file:

File details are as follows:

ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), 
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for 
GNU/Linux 3.2.0, BuildID[sha1]=820d7e089c6c3cdc19fa3e759ccae22fbc672652, 
with debug_info, not stripped

I tried installing Rosetta, tried running with the command with a prefix arch -x86_64
but it resulted in the same error.

If I try to execute them on the terminal application directly, it shows the error:
zsh: exec format error:

0

There are 0 best solutions below