pkg-config cannot find opencv on arch linux

asked 2019-03-08 09:48:55 -0600

updated 2019-12-09 08:04:48 -0600

Akhil Patel gravatar image

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?

edit retag flag offensive close merge delete

Comments

please [take a look here]https://github.com/opencv/opencv...) and talk to the resp. pacman maintainer for opencv

apart from that, you do not have to use pkg-config at al, you can still compile a program like g++ my.cpp -L/where/the/libs/are -lopencv_core ... or use cmake to generate a makefile for your prog.

berak gravatar imageberak ( 2019-03-09 04:15:40 -0600 )edit