libz.so.1: cannot open shared object file


23
down vote favorite
7

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.

share improve this question
 

4 Answers

active oldest votes
up vote 33 down vote

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
share improve this answer
 
12  
This worked for me with one minor change: sudo apt-get install zlib1g:i386 –  E-rich  Nov 7 '14 at 18:48
 
sudo apt-get command not found in CentOS –  Palak  Dec 30 '14 at 12:59
1  
@Palak yum install zlib.i686 –  syslogic  Jun 13 at 8:04 
1  
finally after so much search. sudo apt-get install zlib1g:i386 worked. –  Paresh Dudhat  Sep 21 at 19:22
up vote 8 down vote

This worked for me

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

share improve this answer
 
 
It's worked for me too, Thanks :) –  Ruhollah ツ  May 19 at 16:23
up vote 1 down vote

Check below link: Specially "Install 32 bit libraries (if you're on 64 bit)"

 https://github.com/meteor/meteor/wiki/Mobile-Dev-Install:-Android-on-Linux
share improve this answer
 
 
this is what finally worked for me "sudo apt-get update; sudo apt-get install --yes lib32z1 lib32stdc++6" –  user406905  Apr 4 at 7:10
up vote 0 down vote

I've downloaded these packages:

  • libc6-i386
  • lib32stdc++6
  • lib32gcc1
  • lib32ncurses5
  • zlib1g

I then unpacked them and added the directories to LD_LIBRARY_PATH in my ~/.bashrc. Just make sure to add proper dirs to the path.

你可能感兴趣的:(libz.so.1: cannot open shared object file)