//usr/lib/libgdal.so.20: undefined reference to `TIFFGetSizeProc@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libopencv_imgcodecs.so: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
//usr/lib/libgdal.so.20: undefined reference to `TIFFSetDirectory@LIBTIFF_4.0'
//usr/lib/libgdal.so.20: undefined reference to `TIFFReadScanline@LIBTIFF_4.0'
//usr/lib/libgdal.so.20: undefined reference to `TIFFNumberOfTiles@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libopencv_imgcodecs.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
【解决办法】
libtiff的版本不对,源码编译 TIFF-4.0.4 的版本
其原因时安装的libtiff库和opencv和PLC中调用的libtiff库版本与安装的版本不对应,去libtiff管网http://download.osgeo.org/libtiff/上下载 tiff-4.0.4.tar.gz压缩包安装即可。安装方法如下:
解压 tar -zxvf tiff-4.0.4.tar.gz
进入tiff目录
./configure
make
make install
网上有介绍通过 sudo apt-get install libtiff4-dev
安装,但是运行该命令后,提示 libtiff4-dev 已经被 libtiff5-dev 替代,只可安装libtiff5-dev,安装后并未解决问题。
以上方法无效。
有效的方法是 删除 /root/anaconda3/lib/libtiff*
和 /root/anaconda3/lib/libuuid*