36

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 

4 Answers 4

103

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

sudo apt-get install ia32-libs

Sign up to request clarification or add additional context in comments.

4 Comments

I did follow that guide completely but the package you referred me to fixed the problem. What is it exactly? Thank you!
Your base system is 64 bit, but the binary components distributed by google are 32-bit.
The following packages have unmet dependencies: ia32-libs : Depends: ia32-libs-multiarch E: Unable to correct problems, you have held broken packages.
The solution differs for Ubuntu >= 12.04. See answers from @Guy and Steven.
7

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 

Comments

5
apt-get install lib32ncurses5 lib32stdc++6 

Comments

3

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"

1 Comment

Just a heads up for anyone in the future trying to get Android build tools working. Ubuntu 15.04 required sudo apt-get install lib32stdc++6 lib32z1. lib32ncurses5 may or may not be necessary, I haven't noticed any adverse affects without it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.