我正在尝试编译PCL 1.8并收到以下错误:
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_peer_certificate@OPENSSL_1.0.0'
/usr/lib/libvtkIO.so.5.10.1: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
如果我列出/usr/lib/x86_64-linux-gnu/libpq.so.5
的依赖关系,我会libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0
readelf -h /lib/x86_64-linux-gnu/libssl.so.1.0.0 | grep Class\|File\|Machine'
:
Class: ELF64
Machine: Advanced Micro Devices X86-64
但是,我似乎安装了更多的libpq版本:
/home/t/anaconda2/lib/libssl.so.1.0.0
/home/t/anaconda2/pkgs/openssl-1.0.2j-0/lib/libssl.so.1.0.0
/home/t/matlab/R2015a/bin/glnxa64/libssl.so.1.0.0
/lib/i386-linux-gnu/libssl.so.1.0.0
/lib/x86_64-linux-gnu/libssl.so.1.0.0
/lib/i386-linux-gnu/libssl.so.1.0.0
Class: ELF32
Machine: Intel 80386
和
[ 12%] Linking CXX executable ../../bin/pcl_convert_pcd_ascii_binary
cd /pcl/build/io/tools && /usr/bin/cmake -E cmake_link_script CMakeFiles/pcl_con
vert_pcd_ascii_binary.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++11 -pthread -fopenmp -Wno-deprecated -O2 -g -DNDEB
UG CMakeFiles/pcl_convert_pcd_ascii_binary.dir/convert_pcd_ascii_binary.cpp.o
-o ../../bin/pcl_convert_pcd_ascii_binary -rdynamic -lboost_system -lboost_fil
esystem -lboost_thread -lboost_date_time -lboost_iostreams -lboost_chrono -lboos
t_atomic -lboost_regex -lpthread -lpthread -lm ../../lib/libpcl_io.so.1.8.0 ../.
./lib/libpcl_common.so.1.8.0 ../../lib/libpcl_io_ply.so.1.8.0 -lboost_system -lb
oost_filesystem -lboost_thread -lboost_date_time -lboost_iostreams -lboost_chron
o -lboost_atomic -lboost_regex -lpthread /usr/lib/libvtkGenericFiltering.so.5.10
.1 /usr/lib/libvtkGeovis.so.5.10.1 -lm /usr/lib/libvtkCharts.so.5.10.1 /usr/lib/
libvtkViews.so.5.10.1 /usr/lib/libvtkInfovis.so.5.10.1 /usr/lib/libvtkWidgets.so
.5.10.1 /usr/lib/libvtkVolumeRendering.so.5.10.1 /usr/lib/libvtkHybrid.so.5.10.1
/usr/lib/libvtkParallel.so.5.10.1 /usr/lib/libvtkRendering.so.5.10.1 /usr/lib/l
ibvtkImaging.so.5.10.1 /usr/lib/libvtkGraphics.so.5.10.1 /usr/lib/libvtkIO.so.5.
10.1 /usr/lib/libvtkFiltering.so.5.10.1 /usr/lib/libvtkCommon.so.5.10.1 -lm /usr
/lib/libvtksys.so.5.10.1 -ldl /anaconda2/lib/libpng.so /anaconda2/lib/libz.so -l
usb-1.0 -Wl,-rpath,/pcl/build/lib:/usr/lib/openmpi/lib:/anaconda2/lib: -Wl,-rpat
h-link,/usr/lib/openmpi/lib
//usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_peer_cert
ificate@OPENSSL_1.0.0'
猜猜/ anaconda2 / lib不应该在那里吗?
如何确保CMake链接到正确的版本(并删除错误的版本)?
答案 0 :(得分:1)
我设法编译它从PATH中删除anaconda,并将所有具有anaconda路径的值更改为lib / x86_64-linux-gnu / in cmake-gui
答案 1 :(得分:0)
我遇到了这个问题,但是我将其编译为从PATH中删除anaconda,然后删除构建文件,然后重做cmake,然后进行make。