我在 ubuntu 12.04 上遇到了一个问题:
/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
我试过了
sudo apt-get install lib32z1
但它说
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.
请提出解决方案。
最佳答案
检查 libz.so.1 属于哪个包 (http://packages.ubuntu.com/lucid/i386/zlib1g/filelist) 后,您应该尝试安装 zlib1g:
sudo apt-get install zlib1g
正如@E-rich 所指出的,可能需要在包名称中添加一个 :i386 后缀,以便包管理器正确识别它:
sudo apt-get install zlib1g:i386
EDIT(用于 CentOS 或其他使用 yum
的发行版):
如果有人使用 CentOS(或任何其他使用 yum
的发行版)最终可能会阅读此问题,@syslogic 在评论中提出以下解决方案:
yum install zlib.i686
或者,对于 32 位二进制文件:
yum install zlib.i386
关于android - libz.so.1 : cannot open shared object file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21256866/