如何将一个目录添加到PKG_CONFIG_PATH环境变量?(How to add a direct

2019-10-29 09:01发布

林新使用Ubuntu,问题是,我想安装OpenCV,然后我想用这句话来查看已安装的程序的版本

pkg-config --modversion 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

我试图做的一切,它不工作,有人知道如何解决它?

Answer 1:

安装开发包为:

apt install libopencv-dev


文章来源: How to add a directory to the PKG_CONFIG_PATH environment variable?