Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Ubuntu, I get a 'No such file or directory' error when I try to execute a command.

I have checked with 'ls -la' , the file 'adb' is there and it has 'x' flag So why I am getting a 'No such file or directory'?

~/Programs/android-sdk-linux_x86/platform-tools$ ./adb
 bash: ./adb: No such file or directory
~/Programs/android-sdk-linux_x86/platform-tools$ ls -la
 total 34120
 drwxrwxr-x 3 silverstri silverstri     4096 2011-10-08 18:50 .
 drwxrwxr-x 8 silverstri silverstri     4096 2011-10-08 18:51 ..
 -rwxrwxr-x 1 silverstri silverstri  3764858 2011-10-08 18:50 aapt
 -rwxrwxr-x 1 silverstri silverstri   366661 2011-10-08 18:50 adb
 -rwxrwxr-x 1 silverstri silverstri   906346 2011-10-08 18:50 aidl
 -rwxrwxr-x 1 silverstri silverstri   328445 2011-10-08 18:50 dexdump
 -rwxrwxr-x 1 silverstri silverstri     2603 2011-10-08 18:50 dx
 drwxrwxr-x 2 silverstri silverstri     4096 2011-10-08 18:50 lib
 -rwxrwxr-x 1 silverstri silverstri 14269620 2011-10-08 18:50 llvm-rs-cc
 -rwxrwxr-x 1 silverstri silverstri 14929076 2011-10-08 18:50 llvm-rs-cc-2
 -rw-rw-r-- 1 silverstri silverstri      241 2011-10-08 18:50 llvm-rs-cc.txt
 -rw-rw-r-- 1 silverstri silverstri   332494 2011-10-08 18:50 NOTICE.txt
 -rw-rw-r-- 1 silverstri silverstri      291 2011-10-08 18:50 source.properties
share|improve this question
what do you get if you run file adb – jdigital Oct 9 '11 at 5:43
i get this '$ file adb adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped ' – michael Oct 13 '11 at 3:56

4 Answers

up vote 7 down vote accepted

It's an executable file that misses required libraries. Use ldd to see what it needs, then provide these files.

share|improve this answer
2  
i get this '$ ldd ./adb not a dynamic executable' – michael Oct 11 '11 at 0:36

You probably are on 64-bit and need the 32-bit libs. On ubuntu that involves

sudo apt-get install ia32-libs
share|improve this answer
damn that installs a lot of stuff. But it works. – Travis R May 1 '12 at 2:43
1  
Like michael, "file" told me it was a 32 bit ELF binary and ldd told me it was not a dynamic executable. Installing these 32 bit libraries fixed the problem. – Eponymous Sep 10 '12 at 19:06
sudo apt-get install --reinstall libc6-i386

is also need for me.

share|improve this answer
Did you mean that helped? Any idea why? Where did you get this from? – Tom Wijsman Apr 12 '12 at 15:56

For adb make sure you have the SDK unpacked and have run the SDK Manager to fully populate the SDK. Additionally make sure you have the following installed: A.) JDK 6 or better B.) lib32stdc++6 C.) lib32ncurses5

hoffmanc was the closest to getting it right, I don't really understand why the answer from Daniel Beck is marked as correct when it's not even close and has nothing to do with the problem.

Incidentally, if you try to run a truly non-existant command (i.e.:

# fakecommand

you'll get: fakecommand: command not found, whereas in your situation the output you are seeing is actually coming from adb even though it's not very clear that is the case.

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.