“/ usr / bin / ld:找不到-lz” [英] "/usr/bin/ld: cannot find -lz"
问题描述
我试图在Ubuntu 10.04下编译Android源代码。我收到一个错误消息:
/ usr / bin / ld:找不到-lz
你能告诉我我该如何修复它? 找不到-lz
是什么意思?以下是完整的错误信息:
external / qemu / Makefile.android:1101:warning:覆盖目标`external / qemu /android/avd/hw-config-defs.h'
external / qemu / Makefile.android:933:warning:忽略目标的旧命令`external / qemu / android / avd / hw-config-defs.h '
主机SharedLib:libneo_cgi(out / host / linux-x86 / obj / lib / libneo_cgi.so)
/ usr / bin / ld:跳过不兼容/ usr / lib / gcc / i486-linux- gnu / 4.4.3 /../../../ libz.so搜索-lz
/ usr / bin / ld时:跳过不兼容/usr/lib/gcc/i486-linux-gnu/4.4 .3 /../../../ libz.a搜索-lz
时/ usr / bin / ld:在搜索-lz
时跳过不兼容的/usr/lib/libz.so / usr / bin / ld:在搜索-lz
/ usr / bin / ld时找不到不兼容的/usr/lib/libz.a:找不到-lz
collect2:ld返回1退出状态
make:[错误1
和我的GCC版本输出:
scheung @ scheung-virtual-box:/ media / EXTDIV / mydroid $ gcc --version
gcc(Ubuntu 4.4.3-4ubuntu5)4.4.3
Copyright(C)2009 Free Software Foundation,Inc.
这是免费软件;请参阅复制条件的来源。没有任何b $ b保修;甚至不适用于适销性或针对特定用途的适用性。
我已经有了 zlib1g-dev
库已安装:
$ $ p $ $ sudo apt-get install zlib1g-dev
正在读取软件包列表...完成
构建依赖关系树
读取状态信息...完成
zlib1g-dev已经是最新版本。
(我从此链接。)
我有完全相同的错误,和你一样,安装zlib1g-dev没有修复它。安装lib32z1-dev让我过去了。我有一个64位的系统,它似乎需要32位库。
I am trying to compile Android source code under Ubuntu 10.04. I get an error saying,
/usr/bin/ld: cannot find -lz
Can you please tell me how can I fix it? What does cannot find -lz
mean? Here's the full error message:
external/qemu/Makefile.android:1101: warning: overriding commands for target `external/qemu/android/avd/hw-config-defs.h'
external/qemu/Makefile.android:933: warning: ignoring old commands for target `external/qemu/android/avd/hw-config-defs.h'
host SharedLib: libneo_cgi (out/host/linux-x86/obj/lib/libneo_cgi.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libneo_cgi.so] Error 1
And my GCC version output:
scheung@scheung-virtual-box:/media/EXTDIV/mydroid$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I already have the zlib1g-dev
library installed:
$ sudo apt-get install zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
zlib1g-dev is already the newest version.
(I get that from this link.)
I had the exact same error, and like you, installing zlib1g-dev did not fix it. Installing lib32z1-dev got me past it. I have a 64 bit system and it seems like it wanted the 32 bit library.
这篇关于“/ usr / bin / ld:找不到-lz”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!