fatal error: sys/videoio.h: No such file or directory


Determining if the include file sys/videoio.h exists failed with the following output:
Change Dir: /home/program/opencv-3.2.0/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_3c438/fast"
/usr/bin/make -f CMakeFiles/cmTC_3c438.dir/build.make CMakeFiles/cmTC_3c438.dir/build
make[1]: Entering directory '/home/program/opencv-3.2.0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3c438.dir/CheckIncludeFile.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden  -O3 -DNDEBUG   -o CMakeFiles/cmTC_3c438.dir/CheckIncludeFile.c.o   -c /home/program/opencv-3.2.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/program/opencv-3.2.0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:25: fatal error: sys/videoio.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_3c438.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_3c438.dir/CheckIncludeFile.c.o' failed
make[1]: *** [CMakeFiles/cmTC_3c438.dir/CheckIncludeFile.c.o] Error 1
make[1]: Leaving directory '/home/program/opencv-3.2.0/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_3c438/fast' failed
make: *** [cmTC_3c438/fast] Error 2

解決方案:

 百度后的方法,千篇一律,都是禁用ippicv即可。

但是這個錯誤可以忽略,關注其他不可用項就可以。

最后使用如下命令:

sudo  cmake .. -DCMAKE_BUILD_TYPE=Release -DCUDA_nppi_LIBRARY=true -DWITH_CUDA=OFF -DBUILD_TIFF=ON

編譯通過


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM