opencv安装-ubuntu18.04

Posted Yang_tao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了opencv安装-ubuntu18.04相关的知识,希望对你有一定的参考价值。

opencv安装

 

opencv安装报错:

In file included from /usr/include/host_config.h:50:0,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:0:
/usr/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
 #error -- unsupported GNU version! gcc versions later than 6 are not supported!
  ^~~~~
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):
  Error generating
  /home/ty/Program/opencv-3.4.0/release/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o


modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:1898: recipe for target modules/core/CMakeFiles/opencv_core.dir/all failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 36%] Built target pch_Generate_opencv_test_videostab
Makefile:162: recipe for target all failed
make: *** [all] Error 2

ubuntu18.04预装gcc版本为6.4,需要低于6.

 

以上是关于opencv安装-ubuntu18.04的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu18.04 安装OpenCV

Ubuntu18.04安装opencv和opencv_contrib

Ubuntu 18.04配置OpenCV 4.2.0

在 ubuntu 18.04 上安装 opencv 2.4.9

ubuntu18.04 下利用conda安装opencv3

opencv安装-ubuntu18.04