2016-08-02 8 views
3

우분투 16.04에 몇 개의 자습서를 저장하지 않고 OpenCV를 설치하려고하는데 항상 오류가 발생합니다.우분투에서 OpenCV를 설치하는 중 오류가 발생했습니다. 16.04

https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-OpenCV-3.1-Installation-Guide

내가 무엇을 할 수이 내가이 튜토리얼 다음있어 마지막인가?

[ 48%] Linking CXX executable ../../bin/opencv_test_viz 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
//usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2: undefined reference to `[email protected]_4.0' 
collect2: error: ld returned 1 exit status 
modules/viz/CMakeFiles/opencv_test_viz.dir/build.make:236: recipe for target 'bin/opencv_test_viz' failed 
make[2]: *** [bin/opencv_test_viz] Error 1 
CMakeFiles/Makefile2:3306: recipe for target 'modules/viz/CMakeFiles/opencv_test_viz.dir/all' failed 
make[1]: *** [modules/viz/CMakeFiles/opencv_test_viz.dir/all] Error 2 
Makefile:160: recipe for target 'all' failed 
make: *** [all] Error 2 
+0

'Tagged Image File Format' ('TIFF')에 대한 라이브러리가없는 것 같습니다. 'libtiff5-dev'가 설치되거나 설치되었는지 확인해야합니다. 'libtiff5-dev'가 라이브러리를 포함하지 않는다면'libtiff5'도 설치해야합니다. – alvits

+0

[install-opencv.sh 스크립트] (http://milq.github.io/install-opencv-ubuntu-debian/)를 사용해보십시오. 그것은 우분투 16.04에 대한 테스트를 거쳤으며 내부를 보면 설치중인 패키지 (예 : libpng-dev 및 libtiff5-dev)를 볼 수 있습니다. – unutbu

답변

6

나는 opencv 설치에 대한 동일한 지침서를 따랐으며 동일한 문제가있었습니다. 이 나를 위해 작동합니다

sudo apt-get autoremove libtiff5-dev 

sudo apt-get install libtiff5-dev 

는 OpenCV의 디렉토리를 입력합니다.

cd build/ (내가 그렇지 않으면를 생성, 즉 이미 생성 추측)

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON .. 

make 

다음 자습서를 계속합니다.

1

libpng을 설치/다시 설치해야합니다.

+0

나는 내가 geting하는 오류를 updeted있다. 수표를 다시 plz 수 있습니다. 나는 그것이 libtiff5-dev를 사용하고 libtiff4-dev를 기대하고있는 것처럼 보이는 것과 관련이 있다고 생각한다. –

0

make clean을 시도한 다음 make 명령을 다시 실행하십시오. 일반적으로 하나의 실패 후에 이전 설치를 정리하지 않고 make 명령을 시도하면 오류가 발생합니다.

3

this에 따르면 OpenCV는 우분투가 삭제 한 libtiff4이 필요합니다. 즉, 대체 한 패키지는 libtiff5-dev입니다.

임시 해결 방안으로 OpenCV와 함께 배포되는 libtiff4 버전을 빌드하기 위해 구성 할 때 cmake에서 -DBUILD_TIFF=ON을 지정할 수 있습니다.

이것은 OpenCV 3.2.1과 함께 우분투 16.04에서 저에게 효과적이었습니다.

관련 문제