zoukankan      html  css  js  c++  java
  • 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.

    安装报错:

    Built target opencv_test_cudev

    估计是和cuda有关

    sudo ln -s /usr/bin/gcc-5 /usr/local/cuda-9.1/bin/gcc
    sudo ln -s /usr/bin/g++-5 /usr/local/cuda-9.1/bin/g++`

    注意:/usr/local/cuda-9.1/bin/下发现存在shell脚本 gcc和g++。 (只是sudo mv gcc gcc.sh)
  • 相关阅读:
    CV2图像操作
    Sobel边缘检测
    matlat之KDTreeSearcher()函数
    linux shell 将多行文件转换为一行
    (转)Shell脚本编程--Uniq命令
    (转)iptables简介
    (转)linux passwd批量修改用户密码
    (转)linux sort 命令详解
    (转)Linux命令之md5sum
    (转)shell实例浅谈之产生随机数七种方法
  • 原文地址:https://www.cnblogs.com/yangwithtao/p/9090986.html
Copyright © 2011-2022 走看看