5

I have a weird problem where I cannot run aapt from an sbt command as well as from the shell.

I run this command:

sbt update package-debug

And everything hums along until I get this error:

java.io.IOException: Cannot run program "/home/egervari/Programs/android-sdk-linux_x86/platforms/android-7/tools/aapt": java.io.IOException: error=2, No such file or directory

So I try running it manually, just for the heck of it:

egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ./aapt
bash: ./aapt: No such file or directory

This is pretty weird because it's right there:

egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ls -la
total 4660
drwxr-xr-x 3 egervari egervari    4096 2010-10-16 09:13 .
drwxr-xr-x 8 egervari egervari    4096 2010-10-16 09:13 ..
-rwxrwxrwx 1 egervari egervari 3472673 2010-10-16 09:13 aapt
-rwxrwxrwx 1 egervari egervari 1050328 2010-10-16 09:13 aidl
-rwxrwxrwx 1 egervari egervari  213690 2010-10-16 09:13 dexdump
-rwxrwxrwx 1 egervari egervari    2497 2010-10-16 09:13 dx
drwxr-xr-x 2 egervari egervari    4096 2010-10-16 09:13 lib
-rw-r--r-- 1 egervari egervari   10800 2010-10-16 09:13 NOTICE.txt
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$

Help? :/

egervari
  • 22,372
  • 32
  • 121
  • 175

2 Answers2

12

It looks like you're trying to run a 32-bit binary on a 64-bit OS. Maybe you're missing the required shared libraries. Try running file aapt and ldd ./aapt to see what it says.

If this is the case then installing ia32-libs could fix it, as there are no 64-bit binaries available.

sudo apt-get install ia32-libs
richq
  • 55,548
  • 20
  • 150
  • 144
  • Oh, this could be the case... I'll try those and let you know. I am running 64bit. If you're right, I hope google has x64 versions of these... – egervari Oct 16 '10 at 16:09
  • Yeah, both reported 32-bit libraries: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped. – egervari Oct 17 '10 at 08:31
  • The problem is that I already had ia32-libs installed. It says "ia32-libs is already the newest version. ia32-libs set to manually installed." But when I run it, it works now anyway. VERY WEIRD INDEED! Thanks man! – egervari Oct 17 '10 at 08:32
2

ia32-libs is deprecated.

The following worked for me:

apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

I was still getting error when running aapt, so I installed this:

apt-get install lib32stdc++6

works perfect now.

mick88
  • 852
  • 1
  • 8
  • 12