Trouble Installing OpenCV on a particular machine [closed]

asked 2017-01-26 00:11:31 -0600

yyyc15 gravatar image

I haven't had trouble installing OpenCV before, but this time I am having some trouble. Any help will be much appreciated! The error is such:

/home/user/opencv/build/modules/viz/precomp.hpp:56:31: fatal error: vtkAppendPolyData.h: No such file or directory compilation terminated. modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/build.make:62: recipe for target 'modules/viz/precomp.hpp.gch/opencv_viz_Release.gch' failed make[2]: * [modules/viz/precomp.hpp.gch/opencv_viz_Release.gch] Error 1 CMakeFiles/Makefile2:3388: recipe for target 'modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all' failed make[1]: [modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: ** [all] Error 2

I have installed the libvtk library (sudo apt-get install libvtk6.2 libvtk-java and I also tried installing vtk

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2017-01-27 10:38:04.808580

Comments

If you don't need vtk(I am not sure - is it required for basic opencv?) you can build it without, simply tell cmake using a parameter to ignore vtk in build process.

00Zetti gravatar image00Zetti ( 2017-01-26 03:39:34 -0600 )edit

ran into same problem (VTK7.0)

if you want to disable it:

cmake -DBUILD_opencv_viz=OFF -DWITH_VTK=OFF
berak gravatar imageberak ( 2017-01-26 03:57:12 -0600 )edit

Ahh thanks a lot! You're right, VTK isn't needed for what I want to do. Thanks!

yyyc15 gravatar imageyyyc15 ( 2017-01-26 14:04:08 -0600 )edit

would you make an official issue here ?

berak gravatar imageberak ( 2017-01-27 10:37:37 -0600 )edit

Thanks works for me! Cheers

renex gravatar imagerenex ( 2017-02-02 10:44:52 -0600 )edit