在Ubuntu 15.10中安装Caffe时获取未定义的引用错误 - 它是由libtiff引起的吗?

时间:2017-03-04 18:37:05

标签: ubuntu gnu-make caffe libtiff

我试图在Ubuntu 15.10中安装Caffe。在克隆Caffe repository后,我将Makefile.config.example复制到新文件Makefile.config,并在第91行中取消注释WITH_PYTHON_LAYER := 1

然后,我执行了

cmake .
make

但是,我收到以下错误:

Linking CXX executable caffe
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_peer_certificate@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `CRYPTO_num_locks@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFWriteEncodedStrip@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_use_certificate_file@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ENGINE_free@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `OPENSSL_config@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_get_error@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_use_PrivateKey_file@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `X509_STORE_load_locations@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpoppler.so.52: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpoppler.so.52: undefined reference to `TIFFFdOpen@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_set_ex_data@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_read@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFNumberOfStrips@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `X509_STORE_set_flags@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSLv23_method@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ENGINE_load_private_key@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `X509_get_subject_name@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFReadEncodedTile@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFReadRGBATile@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `CRYPTO_set_id_callback@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_new@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFRGBAImageOK@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_get_cert_store@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_check_private_key@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ENGINE_by_id@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ERR_get_error@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `CRYPTO_set_locking_callback@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_load_error_strings@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_new@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `X509_NAME_get_text_by_NID@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFOpen@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_write@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `X509_free@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_load_verify_locations@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_free@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_ctrl@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFSetField@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ERR_clear_error@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_set_verify@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ENGINE_init@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_set_fd@OPENSSL_1.0.0'
/usr/lib/libgdal.so.1: undefined reference to `sqlite3_column_table_name'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_connect@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ERR_reason_error_string@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_CTX_ctrl@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_pending@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_use_PrivateKey@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFSetWarningHandler@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `ENGINE_finish@OPENSSL_1.0.0'
/usr/local/lib/libopencv_imgcodecs.so.3.2.0: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_library_init@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libpq.so.5: undefined reference to `SSL_shutdown@OPENSSL_1.0.0'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:122: recipe for target 'tools/caffe' failed
make[2]: *** [tools/caffe] Error 1
CMakeFiles/Makefile2:406: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed
make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

查看错误消息,似乎我需要安装libtiff-4包。我已经安装了libtiff5libtiff5-dev,根据this,它应该足够了。但是,它还没有解决问题。

这是问题的原因吗?如果是这样,我该如何纠正?如果没有,我该怎么做才能解决这个问题?

lsb_release -a的输出:

Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily

谢谢

0 个答案:

没有答案