I have the latest Android SDK installed on Ubuntu 12.04 x64 I am having almost an identical problem as Problems with Eclipse and Android SDK. The Eclipse ADT plugin is not working for me, and its Android window shows
SDK/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
when I create a new Android project.
Then I tried
sudo apt-get install ia32-libs
but the commands fails and returns
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
E: Unable to correct problems, you have held broken packages.
Up until now, I followed this answer which worked for the 32-bit adb
, and this may have affected how Ubuntu is handling ia-32-libs
. What must be done to correctly install the necessary libraries to get all the 32-bit Android tools to run correctly?
update
I tried this answer but it didn't work.
I tried
sudo apt-get purge libc6:i386 libncurses5:i386 libstdc++6:i386
but ia32-libs
still did't install.
output of ldd ./aapt
linux-gate.so.1 => (0xf778f000)
librt.so.1 => /lib32/librt.so.1 (0xf7768000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7760000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7740000)
libz.so.1 => not found
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7658000)
libm.so.6 => /lib32/libm.so.6 (0xf7628000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7608000)
libc.so.6 => /lib32/libc.so.6 (0xf7460000)
/lib/ld-linux.so.2 (0xf7790000)
libz.so.1
is not found, and Ubuntu says that zlib1g is already most current.
Here's what worked
sudo apt-get install libgl1-mesa-dri:i386
sudo apt-get install ia32-libs-multiarch:i386
sudo apt-get install ia32-libs-multiarch
sudo apt-get install ia32-libs