How to add a directory to the PKG_CONFIG_PATH envi

2019-08-24 00:24发布

问题:

Im new using Ubuntu, the problem is that i want to install opencv, then i want to see the version of the installed program using this sentence

pkg-config --modversion opencv

Then the terminal shows me this type of "error"

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

I tried to do everything and it doesnt work, someone knows how to fix it?

回答1:

Install the development package as:

apt install libopencv-dev