Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android/Eclipse Installation on Ubuntu 11.04 - aapt and adb not working properly

I am a Linux n00b trying to setup my development environment in Eclipse. I have Eclipse and the Android SDK installed, but I am getting some errors when I start Eclipse or when I try to run ./aapt or ./adb.

jason@ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

jason@ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./adb
./adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64

That ELF class error makes me think I installed a wrong version of the software but I do not recall being asked to choose between x86 and x86-64.

jason@ubuntu:~/usr/android-sdk-linux_x86$ echo $MACHTYPE
x86_64-pc-linux-gnu
like image 915
jcampos8782 Avatar asked Aug 14 '11 12:08

jcampos8782


4 Answers

Are you sure you followed this guide completely? Do you have ia32-libs installed? Try this:

sudo apt-get install ia32-libs

like image 154
Lopa Avatar answered Nov 03 '22 22:11

Lopa


I'm on Ubuntu 13.10 64 bit and the above solutions don't quite work (I'm also using Andriod Studio but that shouldn't matter). I guess the issue is that Google's ADK binary is a 32 bit application. This worked for me:

sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
like image 7
Guy Sirton Avatar answered Nov 03 '22 20:11

Guy Sirton


apt-get install lib32ncurses5 lib32stdc++6
like image 5
Fernando Almeida Avatar answered Nov 03 '22 22:11

Fernando Almeida


It depends on the Ubuntu version you running

If you running Ubuntu < 12.04 then run: sudo apt-get install ia32-libs (ia32-libs was deprecated in 12.04)

If you running Ubuntu >= 12.04 then run: apt-get install lib32ncurses5 lib32stdc++6

To check your ubuntu version click on the cog icon in the top right corner and click "About this computer"

like image 3
Steven Mark Ford Avatar answered Nov 03 '22 22:11

Steven Mark Ford