Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libz.so.1: cannot open shared object file

I am facing an issue on ubuntu 12.04 as :

/usr/lib/ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

I tried

sudo apt-get install lib32z1 

But it says

Reading package lists... Done Building dependency tree Reading state information... Done lib32z1 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 610 not upgraded.

Please suggest a solution.

like image 269
user3218948 Avatar asked Jan 21 '14 11:01

user3218948


2 Answers

After checking to which package does the libz.so.1 belongs (http://packages.ubuntu.com/lucid/i386/zlib1g/filelist) you should try to install zlib1g:

sudo apt-get install zlib1g 

As pointed by @E-rich, it may be required to add a :i386 suffix to the package name for the package manager correctly identify it:

sudo apt-get install zlib1g:i386 


EDIT (for CentOS or other distro that makes use of yum):

If someone using CentOS (or any other distro that makes use of yum) that may end up reading this question, @syslogic proposed the following solution in the comments:

yum install zlib.i686 

or, for 32-bit binaries:

yum install zlib.i386 
like image 88
pah Avatar answered Oct 19 '22 00:10

pah


This worked for me

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5

like image 30
avm Avatar answered Oct 18 '22 22:10

avm