Linux – Can’t Execute Binary on Ubuntu


I can't believe I'm asking this…clearly I'm in rare form today.

Trying to setup a new Ubuntu machine and just downloaded 'p4' (Perforce command line client). It's a single file download – a statically-linked binary executable, so I just did:


…right into /usr/bin. Simple enough. Except:

root@aj-ubuntu:/usr/bin# ll p4 
-rwxr-xr-x 1 root root 748808 2010-02-11 16:54 p4
root@aj-ubuntu:/usr/bin# ./p4 
-su: ./p4: No such file or directory
root@aj-ubuntu:/usr/bin# /usr/bin/p4 
-su: /usr/bin/p4: No such file or directory

What in the world is happening here…?!

Thanks in advance for your ridicule 🙂


Best Answer

Ok, I got the file from your URL (its under 800KB) and tried this (from a Cygwin terminal which was handy).

$ file p4
p4: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

But, you expect it to be statically linked, Why?

Update: Just to be sure, please confirm you are running a 32-bit Ubuntu.
If you are running a 64-bit system, you probably need the 'ia32-libs' package.