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

34,880

Solution 1

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

sudo apt-get install ia32-libs

Solution 2

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

Solution 3

apt-get install lib32ncurses5 lib32stdc++6

Solution 4

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"

Share:
34,880
jcampos8782
Author by

jcampos8782

Updated on June 25, 2020

Comments

  • jcampos8782
    jcampos8782 almost 4 years

    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
    
  • jcampos8782
    jcampos8782 almost 13 years
    I did follow that guide completely but the package you referred me to fixed the problem. What is it exactly? Thank you!
  • mcr
    mcr almost 13 years
    Your base system is 64 bit, but the binary components distributed by google are 32-bit.
  • Karel Burda
    Karel Burda over 11 years
    That suggestion has made my day! Thank you.
  • digit plumber
    digit plumber over 10 years
    The following packages have unmet dependencies: ia32-libs : Depends: ia32-libs-multiarch E: Unable to correct problems, you have held broken packages.
  • Halil
    Halil almost 10 years
    The solution differs for Ubuntu >= 12.04. See answers from @Guy and Steven.
  • Six
    Six over 8 years
    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.