欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决的错误-20200306-安装darknet时,opencv 出现路径问题

程序员文章站 2024-03-25 10:49:40
...
  1. 安装darknet时,opencv 出现问题
    Package opencv was not found in the pkg-config search path.
    Perhaps you should add the directory containing `opencv.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'opencv' found
    
    解决
    apt-file search opencv.pc
    ##查看到libopencv-dev需要安装
    sudo apt-get install libopencv-dev
    
  2. 安装libopencv-dev遇到
    /sbin/ldconfig.real: /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7 is not a symbolic link
    
    解决,找到错误的路径/usr/local/cuda-9.0/targets/x86_64-linux/lib/,查看有libcudnn.so.7.0.5和libcudnn.so.7
    sudo ln -sf /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7.0.5 /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7
    
    自己添加软连接
  3. 安装完libopencv-dev后
    pkg-config --cflags opencv
    #输出
    -I/usr/include/opencv
    
    问题解决
相关标签: 解决问题 ubuntu