Android error: "/usr/bin/ld: cannot find -lz"

Android编译的时候出现错误:

/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status

解决:

sudo apt-get install zlib1g-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
  zlib1g-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 162kB 的软件包。
解压缩后会消耗掉 381kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu/ lucid/main zlib1g-dev 1:1.2.3.3.dfsg-15ubuntu1 [162kB]
下载 162kB,耗时 0秒 (292kB/s)
选中了曾被取消选择的软件包 zlib1g-dev。
(正在读取数据库 ... 系统当前总共安装有 133618 个文件和目录。)
正在解压缩 zlib1g-dev (从 .../zlib1g-dev_1%3a1.2.3.3.dfsg-15ubuntu1_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 zlib1g-dev (1:1.2.3.3.dfsg-15ubuntu1) ...
时间: 2024-07-31 21:53:40

Android error: "/usr/bin/ld: cannot find -lz"的相关文章

【转】“/usr/bin/ld: cannot find -lz”

原文网址:http://stackoverflow.com/questions/3373995/usr-bin-ld-cannot-find-lz I am trying to compile Android source code under Ubuntu 10.04. I get an error saying, /usr/bin/ld: cannot find -lzCan you please tell me how can I fix it? What does cannot find

/usr/bin/ld: cannot find -lz

同事在一台机器上新安装的CentOS,我拷贝一个项目在上面编译,老是报如下错误: “/usr/bin/ld: cannot find -lz” 说明:libz.so是有的,在/lib64下面 我设置环境变量LD_LIBRARY_PATH或者使用-L/lib64都不管用,最后使用的方法是在/usr/lib64下面建立一个软连接ln -fs /lib64/libz.so.1.2.3 /usr/lib64/libz.so

Android 编译错误/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../

编译时出现/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libz.so when searching for -lz错误 ============================================ PLATFORM_VERSION_CODENAME=AOSP PLATFORM_VERSION=AOSP TARGET_PRODUCT=generic TARGET_BUIL

/usr/bin/ld: cannot find -lstdc++ -lz问题

问题1,/usr/bin/ld: cannot find -lstdc++ 解决方法:yum install libstdc++-static.x86_64 问题2,/usr/bin/ld: cannot find -lz 解决方法:yum install zlib-static.x86_64 之前尝试过安装stdc++和zlib的其他非static库,但都没有解决问题: 原文地址:https://www.cnblogs.com/guoliushui/p/9525088.html

chkrootkit 编译报错的解决/usr/bin/ld: cannot find -lc

1:Centos6.5安装chkrootkit wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz tar xvf chkrootkit.tar.gz cd chkrootkit-0.51/ make sense报错如下: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status make: *** [strings-static] Error 1 2:解决

【转】linux /usr/bin/ld cannot find 解决

原文网址:http://blog.csdn.net/mzwang123/article/details/6702889 问题:在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息: /usr/bin/ld: cannot find -lxxx 这些讯息会随着编译不同类型的source code 而有不同的结果出来如: /usr/bin/ld: cannot find -lc /usr/bin/ld: cannot find -lltdl /usr/bin/ld:

Linux编译问题——/usr/bin/ld: cannot find -lxxx问题总结

作者:zhanhailiang 日期:2014-12-08 make时报"/usr/bin/ld: cannot find -lxxx",是指编译过程找不到对应库文件,其中,-lxxx表示链接库文件libxxx.so. 一般出现这种错误有以下几种原因: 系统缺乏对应的库文件: 版本不对应: 库文件的链接错误: 库文件路径设置问题. 前两种情况只需要下载安装lib库即可(一般地,yum install libxxx-dev或apt-get install libxxx-dev直接安装即可

usr/bin/ld: cannot find 错误解决方法和 /etc/ld.so.conf

我makefile出现这个错误: HelloWorldServer.c:(.text+0xaa): undefined reference to `zmq_send'collect2: error: ld returned 1 exit statusmake: *** [HelloWorldServer] Error 1 一直以为没找到动态库,但是指定了具体路径: LDFLAGS=  -L /opt/zeromq/lib -lzmq $(CC)  $(CFLAGS) $(LDFLAGS) -o

/usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Err

/usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Error 1 解决的方法: yum install *ltdl*