解决的错误-20200306-安装darknet时,opencv 出现路径问题
程序员文章站
2024-03-25 10:49:40
...
- 安装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
- 安装libopencv-dev遇到
解决,找到错误的路径/usr/local/cuda-9.0/targets/x86_64-linux/lib/,查看有libcudnn.so.7.0.5和libcudnn.so.7/sbin/ldconfig.real: /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7 is not a symbolic link
自己添加软连接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
- 安装完libopencv-dev后
问题解决pkg-config --cflags opencv #输出 -I/usr/include/opencv
上一篇: 计算机视觉之opencv:初识
下一篇: pytorch 多次backward