libz was not found

本文解决了在编译libid3tag时遇到的找不到zlib(libz)的问题。通过检查并确认编译参数-L指定的路径无误后,发现实际问题是由于zlib库文件的格式不匹配导致。最终通过指定正确的编译参数和修改Makefile中的编译工具来成功生成兼容的zlib库。

编译libid3tag

 error: libz was not found *** You must first install zlib (libz) before you can build this package. *** If zlib is already installed, you may need to use the LDFLAGS *** environment variable to specify its installed location, e.g. -L.

 

起初我怀疑是配置编译时指定的库目录不对,可是我查看了几遍,-L指定的库目录和我zlib编译后指定的目录是一致的,其中也有libz.a,可是为什么会报错误,提示找不到呢?后来我把libz.a解压开"ar -t libz.a","file adler32.o"看到

 

adler32.o: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),  not stripped

 

 

原因就一目了然,原来是格式不正确,所以在编译zlib时,记得先指定生成目录,--prefix=/home/mdx/workdir/mp3/libz,再更改Makefile:

         CC=arm-none-linux-gnueabi-gcc

   AR=arm-none-linux-gnueabi-ar rcs

   RANLIB=arm-none-linux-gnueabi-ranlib

make ,make install ,编译好之后就可以在上面prefix指定的目录下的lib目录下找到libz.a这个库。

lenovo@lenovo-pc:~/桌面$ box64 '/home/lenovo/桌面/release/OpticalMaterialDB' Box64 v0.1.2 built on Sep 2 2025 20:01:29 Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/ Using default BOX64_PATH: ./:bin/ Counted 61 Env var Looking for /home/lenovo/桌面/release/OpticalMaterialDB Using emulated /home/lenovo/桌面/release/lib/libQt5Charts.so.5 Using emulated /home/lenovo/桌面/release/lib/libQt5Widgets.so.5 Using emulated /home/lenovo/桌面/release/lib/libQt5Gui.so.5 Using emulated /home/lenovo/桌面/release/lib/libQt5Sql.so.5 Using emulated /home/lenovo/桌面/release/lib/libQt5Core.so.5 Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6 Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux-x86-64.so.2 Using native(wrapped) libpthread.so.0 Using native(wrapped) librt.so.1 Using native(wrapped) libGL.so.1 Using native(wrapped) libm.so.6 Using native(wrapped) libz.so.1 Using emulated /home/lenovo/桌面/release/lib/libicui18n.so.56 Using emulated /home/lenovo/桌面/release/lib/libicuuc.so.56 Using emulated /home/lenovo/桌面/release/lib/libicudata.so.56 Using native(wrapped) libdl.so.2 Using emulated /home/lenovo/桌面/release/lib/libgthread-2.0.so.0 Using emulated /home/lenovo/桌面/release/lib/libglib-2.0.so.0 Using emulated /home/lenovo/桌面/release/lib/libpcre.so.3 Using emulated /home/lenovo/桌面/release/plugins/platforms/libqxcb.so Using emulated /home/lenovo/桌面/release/plugins/platforms/../../lib/libQt5XcbQpa.so.5 Using native(wrapped) libfontconfig.so.1 Using native(wrapped) libfreetype.so.6 Using emulated /home/lenovo/桌面/release/plugins/platforms/../../lib/libQt5DBus.so.5 Using native(wrapped) libX11-xcb.so.1 Using native(wrapped) libxcb.so.1 Using native(wrapped) libXext.so.6 Using native(wrapped) libX11.so.6 Using native(wrapped) libXau.so.6 Using native(wrapped) libXdmcp.so.6 Using emulated /home/lenovo/桌面/release/plugins/platforms/../../lib/libxkbcommon-x11.so.0 Using emulated /home/lenovo/桌面/release/plugins/platforms/../../lib/libxkbcommon.so.0 Using native(wrapped) libdbus-1.so.3 Using emulated /home/lenovo/桌面/release/lib/libxcb-xkb.so.1 Using native(wrapped) libXcursor.so.1 Using emulated /home/lenovo/桌面/release/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so tmpStr: "" "" content readFile() false Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqgif.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqicns.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqico.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqjpeg.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqsvg.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/../../lib/libQt5Svg.so.5 Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqtga.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqtiff.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqwbmp.so Using emulated /home/lenovo/桌面/release/plugins/imageformats/libqwebp.so libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile Error: PltResolver: Symbol dbus_message_get_allow_interactive_authorization(ver 23: dbus_message_get_allow_interactive_authorization@LIBDBUS_1_3) not found, cannot apply R_X86_64_JUMP_SLOT 0x7f8cf5b758 (0x7f8cce4d96) in /home/lenovo/桌面/release/plugins/platforms/../../lib/libQt5DBus.so.5 Error: PltResolver: Symbol dbus_message_set_allow_interactive_authorization(ver 23: dbus_message_set_allow_interactive_authorization@LIBDBUS_1_3) not found, cannot apply R_X86_64_JUMP_SLOT 0x7f8cf5b0b8 (0x7f8cce4056) in /home/lenovo/桌面/release/plugins/platforms/../../lib/libQt5DBus.so.5 Library libQt5Svg.so.5 (0x99ddb190) needs 0x99dd1520, but it was not found. Ignoring. Library libQt5XcbQpa.so.5 (0x99b7f910) needs 0x99b7ba00, but it was not found. Ignoring. Library libxkbcommon-x11.so.0 (0x99ce5400) needs 0x99b7ba00, but it was not found. Ignoring. Library libQt5DBus.so.5 (0x99c5f600) needs 0x99b7ba00, but it was not found. Ignoring. Library libxkbcommon.so.0 (0x99ceba10) needs 0x99d75e50, but it was not found. Ignoring. Library libxkbcommon.so.0 (0x99ceba10) needs 0x99b7ba00, but it was not found. Ignoring. Library libXext.so.6 (0x99cdf4e0) needs 0x99b7ba00, but it was not found. Ignoring. Library libX11.so.6 (0x99cdf810) needs 0x99b7ba00, but it was not found. Ignoring. Library libxcb.so.1 (0x99cdf360) needs 0x99b7ba00, but it was not found. Ignoring. Library libX11-xcb.so.1 (0x99cde240) needs 0x99b7ba00, but it was not found. Ignoring. Library libfreetype.so.6 (0x99c5f430) needs 0x99b7ba00, but it was not found. Ignoring. Library libfontconfig.so.1 (0x99c5cc90) needs 0x99b7ba00, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99e72bb0, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99e68b90, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99e379b0, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99d951f0, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99dd1520, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99db0cd0, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99da5590, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99d87100, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99d888d0, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99d75e50, but it was not found. Ignoring. Library libQt5Core.so.5 (0x995ab160) needs 0x99b7ba00, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99e72bb0, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99e68b90, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99e379b0, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99d951f0, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99dd1520, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99db0cd0, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99da5590, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99d87100, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99d888d0, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99d75e50, but it was not found. Ignoring. Library libQt5Gui.so.5 (0x99324600) needs 0x99b7ba00, but it was not found. Ignoring. Library libQt5Widgets.so.5 (0x990ac780) needs 0x99dd1520, but it was not found. Ignoring. Library libdl.so.2 (0x999d0980) needs 0x99b7ba00, but it was not found. Ignoring. Library libz.so.1 (0x9982ba40) needs 0x99e379b0, but it was not found. Ignoring. Library libz.so.1 (0x9982ba40) needs 0x99b7ba00, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99e72bb0, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99e68b90, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99e379b0, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99d951f0, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99dd1520, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99db0cd0, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99da5590, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99d87100, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99d888d0, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99d75e50, but it was not found. Ignoring. Library libm.so.6 (0x9982b590) needs 0x99b7ba00, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99e72bb0, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99e68b90, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99e379b0, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99d951f0, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99dd1520, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99db0cd0, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99da5590, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99d87100, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99d888d0, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99d75e50, but it was not found. Ignoring. Library libstdc++.so.6 (0x9974d1a0) needs 0x99b7ba00, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99e72bb0, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99e68b90, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99e379b0, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99d951f0, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99dd1520, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99db0cd0, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99da5590, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99d87100, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99d888d0, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99d75e50, but it was not found. Ignoring. Library libGL.so.1 (0x9981ae20) needs 0x99b7ba00, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99e72bb0, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99e68b90, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99e379b0, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99d951f0, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99dd1520, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99db0cd0, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99da5590, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99d87100, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99d888d0, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99d75e50, but it was not found. Ignoring. Library libc.so.6 (0x998192b0) needs 0x99b7ba00, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99e72bb0, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99e68b90, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99e379b0, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99d951f0, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99dd1520, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99db0cd0, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99da5590, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99d87100, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99d888d0, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99d75e50, but it was not found. Ignoring. Library libgcc_s.so.1 (0x9980f810) needs 0x99b7ba00, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99e72bb0, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99e68b90, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99e379b0, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99d951f0, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99dd1520, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99db0cd0, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99da5590, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99d87100, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99d888d0, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99d75e50, but it was not found. Ignoring. Library libpthread.so.0 (0x9981a7b0) needs 0x99b7ba00, but it was not found. Ignoring. Stop waiting for remaining thread 450941 已放弃 (核心已转储)
最新发布
09-03
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值