简体   繁体   中英

install opencv on ubuntu 18.04

I've been trying to install opencv , using thisreferance . But when I try to run make command, I get error as follows:

/opt/opencv/modules/videoio/src/cap_dc1394_v2.cpp:59:10: fatal error: 
dc1394/dc1394.h: No such file or directory
#include <dc1394/dc1394.h>
      ^~~~~~~~~~~~~~~~~
compilation terminated.
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:278: recipe for 
target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o' 
failed
make[2]: *** 
[modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o] Error 
1
CMakeFiles/Makefile2:6307: recipe for target 
'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

I tried so many times to install opencv , when the installation is completed, I tried to check the installation, and then I get error that there is no module named opencv .

I recommend to use this guide to download the OpenCV Libary to the linux. (ubuntu 18.04).

I did it today on my ubuntu 18.04 and it worked perfectly, but please read all the guide and don't just copy the terminal commands.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM