Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

wget http://www.perforce.com/downloads/perforce/r09.2/bin.linux26x86/p4

...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 :)

-aj

share|improve this question
    
Change the title Dude.. :-\ –  Bibhas Feb 11 '10 at 22:06
    
@Bibhas - fair enough. –  AJ. Feb 11 '10 at 22:07
    
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. tks for the tip u just save me from 8 hours of pain in hell :) –  user129590 Apr 22 '12 at 6:10

7 Answers 7

up vote 4 down vote accepted

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.

share|improve this answer
    
@nik - see my note to @gbjbaanb below. I tried 'ldd' and all it said was: " not a dynamic executable." So, I assumed it was statically linked. –  AJ. Feb 12 '10 at 1:44
1  
confirm, that's what file gives on my system as well. i don't have a running Linux system available at the moment so i can't check ldd. –  quack quixote Feb 12 '10 at 8:06
2  
@nik - your update nailed it. i am running 64-bit ubuntu but the binary was built for 32-bit architecture. i installed ia32-libs and that fixed it, thanks. –  AJ. Feb 14 '10 at 14:44

try file ./p4 and see what it says. Chances are you don't have the right libraries installed to run it (so it cannot load the binary at all - you get the same issues with Windows if you don't have the right dlls)

share|improve this answer
    
@gbjbaanb - I tried 'ldd' and all it said was: " not a dynamic executable." I didn't know about 'file' though...I'll try that. –  AJ. Feb 11 '10 at 22:28

Do ls -lb p4* to see if there are any stray characters in the filename.

share|improve this answer

That's what happens when your executable isn't valid, it might be for another architecture or for another kernel. Or just a corrupted ELF header.

share|improve this answer

The intepreter readelf -a /usr/bin/p4 | grep interpreter points to is probably missing. It's probably shipped in some compat package as pointed out by other commenters.

share|improve this answer
    
output: [Requesting program interpreter: /lib/ld-linux.so.2] ... –  quack quixote Feb 12 '10 at 21:56

chmod +x /usr/bin/p4

share|improve this answer

static executable is not dependent of libraries.... it needc a compatible kernel, namely one that has same system calls as it was built on.

p4 is a perforce client, and yours is built against kernel v2.2.5 10 years ago...

it will work with (long unsupported) later 2.2 kernels,

it may work with (month since unsupported) 2.4 kernels,

it will not work with (still supported) 2.6 and 3.x kernels

They make version for 2.6 clients http://www.perforce.com/downloads/complete_list available for your needs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.