Package opencv was not found in the pkg-config search path. Perhaps you should add the directory con
Opencv in The not found path add config
2023-09-11 14:19:19 时间
使用pkg-config和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
- List item
方法一,按照错误信息,执行命令
export PKG_CONFIG_PATH=/your/path:$PKG_CONFIG_PATH
再查看一下
echo $PKG_CONFIG_PATH
/your/path指的是,安装路径中含有opencv4.pc或者opencv.pc的文件夹路径
方法二,把opencv4.pc文件添加到,pkg-config的搜索路径中,执行
find / -name pkgconfig
找到如下路径,
/usr/share/pkgconfig
/usr/lib/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig
选择一个即可
然后把.pc文件复制到选择的文件夹中
例如选择/usr/lib/pkgconfig
sudo cp /opt/opencv4.5.5/lib/pkgconfig/opencv4.pc /usr/lib/pkgconfig
相关文章
- The three top-paying tech roles in 2022 and the skills you need to land them
- linux-Ubantu系统,基于java基础镜像,dockerfile源码编译安装opencv,重新制作docker镜像
- 关于最近利用Cmake编译OpenCV的一些心得体会
- 用OpenCV的函数distanceTransform()作图像的距离变换,并找出图像中图形的几何中心
- 利用OpenCV的库函数Sobel()和Scharr()作图像的边缘检测
- 【OpenCV】直方图应用:直方图均衡化,直方图匹配,对比直方图
- Java OpenCV 模版匹配
- The development prospect of SAP consultants in China in the next decade
- OpenCV获取图像某点的颜色值,并设置某点的颜色
- OpenCV图像各向异性滤波
- The operation names in the portType match the method names in the SEI or Web service implementation class.
- In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `l
- 【OpenCV】基于kmeans的细胞检测方法
- 【Computer Vision学习】基于python的OpenCV的快速入门
- OpenCV绘制直线,矩形和园
- 全网最简单的安装opencv4.5+opencv_contrib-4.5.0的方法
- java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986