Ask Your Question

Revision history [back]

pkg-config cannot find opencv on arch linux

I am using arch linux and I recently installed opencv4 from pacman repos. I am having trouble compiling my test program. when I do pkg-config --modversion opencv it gives me an error saying :

$  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
Package 'opencv', required by 'virtual:world', not found

Where can I find this opencv.pc as I dont want to build opencv as it takes time and is also a huge task. Anyway to get it directly installed from arch linux repos?

click to hide/show revision 2
retagged

pkg-config cannot find opencv on arch linux

I am using arch linux and I recently installed opencv4 from pacman repos. I am having trouble compiling my test program. when I do pkg-config --modversion opencv it gives me an error saying :

$  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
Package 'opencv', required by 'virtual:world', not found

Where can I find this opencv.pc as I dont want to build opencv as it takes time and is also a huge task. Anyway to get it directly installed from arch linux repos?