caffe编译时候出现 undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'

时间:2022-04-11 08:04:01

1.编译时候出现 
make: * [.build_release/examples/siamese/convert_mnist_siamese_data.bin] Error 1 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadDirectory@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFWriteEncodedStrip@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFIsTiled@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFOpen@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFSetField@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFWriteScanline@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFGetField@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFScanlineSize@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFNumberOfStrips@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFSetWarningHandler@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFSetErrorHandler@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadEncodedTile@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFReadRGBATile@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFClose@LIBTIFF_4.0' 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
TIFFRGBAImageOK@LIBTIFF_4.0’ 
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0’ 
collect2: error: ld returned 1 exit status 
这个可能是权限问题,采用以下指令: 
sudo su; 
make all -j16; 
make test -j16; 
make runtest -j16; 
make pycaffe; 
一切都能顺利解决。

  1. caffe/proto/caffe.pb.h: No such file or directory 
    也是权限问题

3.openCV program compile error “libopencv_core.so.2.4: cannot open shared object file: No such file or directory” 坑内是opencv版本有问题,或者路径没加。重新编译或者加路径。