Libz.so.1: cannot open shared objects file

I ran into a problem on ubuntu 12.04:

/usr/lib/ndk/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../Library/GCC/ARM-Linux-androideabi/4,6/ .. /../../../arm-linux-androideabi/bin/as: Error loading shared libraries: libz.so.1: cannot open shared object file: There is no such file or directory

I tried

sudo apt-get install lib32z1 

But he says

Reading package lists ... Done Creating a dependency tree Reading status information ... Done lib32z1 is the newest version. 0 updated, 0 reinstalled, 0 removed and 610 not updated.

Please suggest a solution.

+58
android ubuntu android-sdk-tools
Jan 21 '14 at 11:29
source share
7 answers

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

 sudo apt-get install zlib1g 

As pointed out by @ E-rich, you may need to add the suffix: i386 to the package name for the package manager that correctly identifies it:

 sudo apt-get install zlib1g:i386 


EDIT (for CentOS or another distribution using yum ):

If someone uses CentOS (or any other distribution that uses yum ) that may end up reading this question, @syslogic suggested the following solution in the comments:

 yum install zlib.i686 

or, for 32-bit binaries:

 yum install zlib.i386 
+96
May 04 '14 at 8:37
source share
โ€” -

It worked for me

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

+17
Mar 23 '14 at 15:28
source share

For Fedora (may be useful to someone)

sudo dnf install zlib-1.2.8-10.fc24.i686 libgcc-6.1.1-2.fc24.i686

+3
May 20 '16 at 11:19
source share

Check the link below: Specially "Install 32-bit libraries (if you are on the 64-bit version)"

  https://github.com/meteor/meteor/wiki/Mobile-Dev-Install:-Android-on-Linux 
+2
Jan 13 '15 at 17:30
source share

sudo apt-get install zlib1g: i386 fixed Gradle problem on Android 2.1.1 on Xubuntu 16.04.

+2
May 13 '16 at 4:55
source share

for centos, just zlib did not solve the problem. I did sudo yum install zlib-devel.i686

0
Nov 04 '17 at 20:51
source share

I downloaded these packages:

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

Then I unpacked them and added the directories in LD_LIBRARY_PATH to my ~/.bashrc . Just remember to add the correct paths to the path.

-one
Aug 27 '14 at 18:30
source share



All Articles