Thursday, November 11, 2021

[SOLVED] cannot execute binary file on 64bit system

Issue

I don't understand why i'm getting this error... Is this a path issue??

I have a 64bit system

[XXXXXXXX ~]$ uname -m
x86_64

[XXXXXXXX ~]$ file AAAAAAA.bin
AAAAAAA.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.2.5, stripped

[xxxxxxxxx ~]$ ls -lha  ./AAAAAAA.bin
-rwxrwxr-x. 1 user.name user.name 161M Sep 27 13:07 ./AAAAAAA.bin

[xxxxxxxxx ~]$ sudo sh ./AAAAAAA.bin: cannot execute binary file

Why can't I execute the file??? Any help will be much appreciated


Solution

You can't execute this file with sh because this is not a shell script.

Execute it directly instead:

./AAAAAAA.bin


Answered By - that other guy