我正在编译自己的库,它链接到libjpeg。
我在两台计算机上编译,但这不适用于一台计算机
他们错误如下:
Wrong JPEG library version: library is 62, caller expects 80
但是只安装了libjpeg8:
/usr/lib/i386-linux-gnu/libjpeg.so.8
/usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
/usr/lib/x86_64-linux-gnu/libjpeg.a
/usr/lib/x86_64-linux-gnu/libjpeg.so
/usr/lib/x86_64-linux-gnu/libjpeg.so.8
/usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
/usr/local/cuda-5.0/jre/lib/amd64/libjpeg.so
我的cmake链接到正确的SO文件:
-- Found libjpeg:
-- - Includes: /usr/include
-- - Libraries: /usr/lib/x86_64-linux-gnu/libjpeg.so
老实说,我不知道发生了什么...... 有任何想法吗 ?提前谢谢!
有一些危险。如果我没有将我的程序链接到任何类型的jpeg库,我的代码编译,我可以执行它,我也得到相同的消息错误。但是,如果我对我的可执行文件执行ldd,则没有libjpeg的痕迹。怎么可能?
linux-vdso.so.1 => (0x00007fff83bfe000)
libopencv_calib3d.so.2.4 => /usr/local/lib/libopencv_calib3d.so.2.4 (0x00007fa79670c000)
libopencv_contrib.so.2.4 => /usr/local/lib/libopencv_contrib.so.2.4 (0x00007fa796423000)
libopencv_core.so.2.4 => /usr/local/lib/libopencv_core.so.2.4 (0x00007fa795dca000)
libopencv_highgui.so.2.4 => /usr/local/lib/libopencv_highgui.so.2.4 (0x00007fa795999000)
libopencv_imgproc.so.2.4 => /usr/local/lib/libopencv_imgproc.so.2.4 (0x00007fa7954ed000)
libopencv_ml.so.2.4 => /usr/local/lib/libopencv_ml.so.2.4 (0x00007fa79526e000)
libvitals.so.0.2 => /home/jean/Lib/libvitals.so.0.2 (0x00007fa794f7b000)
librobbie.so.0.1 => /home/jean/Lib/librobbie.so.0.1 (0x00007fa794d32000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa794a11000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa79470c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa7944f6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa79412d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa793f10000)
libopencv_flann.so.2.4 => /usr/local/lib/libopencv_flann.so.2.4 (0x00007fa793ca1000)
libopencv_features2d.so.2.4 => /usr/local/lib/libopencv_features2d.so.2.4 (0x00007fa7939f8000)
libopencv_video.so.2.4 => /usr/local/lib/libopencv_video.so.2.4 (0x00007fa7937a1000)
libopencv_objdetect.so.2.4 => /usr/local/lib/libopencv_objdetect.so.2.4 (0x00007fa793522000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa79330a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa793102000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fa792dd4000)
libcudart.so.5.0 => /usr/local/cuda/lib64/libcudart.so.5.0 (0x00007fa792b79000)
libnpp.so.5.0 => /usr/local/cuda/lib64/libnpp.so.5.0 (0x00007fa78d08c000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fa78ce66000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fa78c82c000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007fa78c57a000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fa78c32b000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa78c02e000)
libgtkglext-x11-1.0.so.0 => /usr/lib/libgtkglext-x11-1.0.so.0 (0x00007fa78be2a000)
libgdkglext-x11-1.0.so.0 => /usr/lib/libgdkglext-x11-1.0.so.0 (0x00007fa78bbc6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa78b9c1000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fa78b7bc000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fa78b596000)
libxml++-2.6.so.2 => /usr/lib/libxml++-2.6.so.2 (0x00007fa78b372000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fa78b00f000)
libglibmm-2.4.so.1 => /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 (0x00007fa78ada5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa7969ae000)
libnvidia-tls.so.319.23 => /usr/lib/tls/libnvidia-tls.so.319.23 (0x00007fa78aba1000)
libnvidia-glcore.so.319.23 => /usr/lib/libnvidia-glcore.so.319.23 (0x00007fa78864b000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa788310000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa7880fe000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fa787ef9000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fa787cec000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fa787ae6000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fa7878c3000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fa7875bf000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fa78739f000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fa787044000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fa786e30000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fa786be5000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fa7869aa000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa7867a0000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fa78659d000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fa78638c000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fa786182000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fa785f77000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fa785d73000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fa785b70000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa785967000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa785728000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fa7854a9000)
libXmu.so.6 => /usr/lib/x86_64-linux-gnu/libXmu.so.6 (0x00007fa785290000)
libpangox-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangox-1.0.so.0 (0x00007fa785082000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa784e60000)
libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007fa784c5a000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa784a3c000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fa78479e000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fa784507000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fa784304000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fa7840f9000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fa783eda000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa783cbf000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fa783a28000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa7837fe000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007fa783598000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa783393000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa78318d000)
libicule.so.48 => /usr/lib/x86_64-linux-gnu/libicule.so.48 (0x00007fa782f57000)
libicuuc.so.48 => /usr/lib/x86_64-linux-gnu/libicuuc.so.48 (0x00007fa782bec000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fa7829e4000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fa7827c7000)
libicudata.so.48 => /usr/lib/x86_64-linux-gnu/libicudata.so.48 (0x00007fa781457000)
答案 0 :(得分:0)
有用的评论Joe Z!我记得我昨晚在我的机器上安装了一个新软件“Kingsoft Office”,它安装了一个嵌入版本的libjpeg(版本62)。但我昨晚也卸载了它,我确保只有版本8仍然存在。但一定搞砸了我的libs。请注意,我也安装了OpenCV,它是很久以前使用libjpeg支持构建的。因此,通过考虑您的评论,我只是在没有libjpeg支持的情况下重建了OpenCV,现在一切正常。