我关注the official install guide CMake Build部分遇到以下错误。
/usr/bin/ld: warning: libtiff.so.5, needed by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9, not found (try using -rpath or -rpath-link)
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference to `GOMP_parallel@GOMP_4.0'
ldd libopencv.so
ldd: ./libopencv.so: No such file or directory
已安装libtiff-dev和libopencv-dev
sudo apt-get install libtiff-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libtiff5-dev' instead of 'libtiff-dev'
libtiff5-dev is already the newest version (4.0.6-1ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.
sudo apt-get install libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopencv-dev is already the newest version (2.4.9.1+dfsg-1.5ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.
-- OpenCV found (/usr/share/OpenCV)
-- Found Atlas (include: /usr/include library: /usr/lib/libatlas.so lapack: /usr /lib/liblapack.so
-- NumPy ver. 1.12.1 found (include: /root/anaconda2/lib/python2.7/site-packages /numpy/core/include)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
--
-- ******************* Caffe Configuration Summary *******************
-- General:
-- Version : 1.0.0
-- Git : 1.0-14-g4efdf7e
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- Release CXX flags : -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno- unini tialized
-- Debug CXX flags : -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
-- Build type : Release
--
-- BUILD_SHARED_LIBS : ON
-- BUILD_python : ON
-- BUILD_matlab : OFF
-- BUILD_docs : ON
-- CPU_ONLY : OFF
-- USE_OPENCV : ON
-- USE_LEVELDB : ON
-- USE_LMDB : ON
-- USE_NCCL : OFF
-- ALLOW_LMDB_NOLOCK : OFF
--
-- Dependencies:
-- BLAS : Yes (Atlas)
-- Boost : Yes (ver. 1.58)
-- glog : Yes
-- gflags : Yes
-- protobuf : Yes (ver. 2.6.1)
-- lmdb : Yes (ver. 0.9.17)
-- LevelDB : Yes (ver. 1.18)
-- Snappy : Yes (ver. 1.1.3)
-- OpenCV : Yes (ver. 2.4.9.1)
-- CUDA : Yes (ver. 8.0)
cmake配置信息显示/usr/share/
中的opencv我是否需要将其删除?
我尝试使用opencv源代码,但稍后删除源代码。
它还说CPU-ONLY OFF
但是我想只使用CPU而我在CPU_ONLY :=1
取消注释Makefile.config
这是对的吗?
在源路径中尝试make clean
和make all
遇到错误
warning: libtiff.so.5, needed by /usr/lib/gcc/x86_64-linux-gnu/5/.. /../../x86_64-linux-gnu/libopencv_highgui.so, not found (try using -rpath or -rp ath-link)
.build_release/tools/upgrade_solver_proto_text.o: In function `main':
upgrade_solver_proto_text.cpp:(.text.startup+0x214): undefined reference to `std ::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M _create(unsigned long&, unsigned long)'
.build_release/tools/upgrade_solver_proto_text.o: In function `boost::system::sy stem_error::what() const':
发现an answer谈论修复libtiff问题。
locate libtiff.so
/root/anaconda2/pkgs/libtiff-4.0.6-3/lib/libtiff.so
/root/anaconda2/pkgs/libtiff-4.0.6-3/lib/libtiff.so.5
/root/anaconda2/pkgs/libtiff-4.0.6-3/lib/libtiff.so.5.2.4
/usr/lib/x86_64-linux-gnu/libtiff.so
ldd libopencv_highgui.so.2.4.9 | grep libtiff
libtiff.so.5 => not found
我曾尝试从源代码安装opencv,所以也许x86_
路径来自源代码库?如何解决?只需删除它们吗?