我正在嘗試在Ubuntu 10.04下編譯Android源代碼。我收到一個(gè)錯(cuò)誤消息,/ usr / bin / ld:找不到-lz你能告訴我如何解決嗎?什么cannot find -lz意思 這是完整的錯(cuò)誤消息: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 -lzcollect2: ld returned 1 exit statusmake: *** [out/host/linux-x86/obj/lib/libneo_cgi.so] Error 1和我的GCC版本輸出:scheung@scheung-virtual-box:/media/EXTDIV/mydroid$ gcc --versiongcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3Copyright (C) 2009 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.我已經(jīng)安裝了zlib1g-dev庫(kù):$ sudo apt-get install zlib1g-dev Reading package lists... DoneBuilding dependency tree Reading state information... Donezlib1g-dev is already the newest version.
“ / usr / bin / ld:找不到-lz”
人到中年有點(diǎn)甜
2019-12-25 10:55:57