I have a container where opencv is installed. (click here if you want to see the dockerfile)
However once I enter the container when I do
pkg-config --cflags --libs opencv
I get
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
What could be happening and how can I solve this?
Notes:
As you can see in the dockerfile, pkg-config seems to be installed
also, I wanted to try the solution in here but under /usr/local/lib
there is no folder or file called pkg-config
Also I made find / -name opencv.pc
but got nothing.
Edit:
The cmake was called as
cmake \
-DOPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib-${OPENCV_VERSION}/modules \
-DWITH_CUDA=ON \
-DCUDA_ARCH_BIN=7.5,8.0,8.6 \
-DCMAKE_BUILD_TYPE=RELEASE \
# Install path will be /usr/local/lib (lib is implicit)
-DCMAKE_INSTALL_PREFIX=/usr/local \
.. &&\
Edit2: The installation starts with
Install the project...
-- Install configuration: "RELEASE"
-- Installing: /usr/local/share/licenses/opencv4/ippicv-readme.htm
-- Installing: /usr/local/share/licenses/opencv4/ippicv-EULA.txt
-- Installing: /usr/local/share/licenses/opencv4/ippicv-third-party-programs.txt -- Installing: /usr/local/share/licenses/opencv4/ippiw-support.txt
-- Installing: /usr/local/share/licenses/opencv4/ippiw-third-party-programs.txt
-- Installing: /usr/local/share/licenses/opencv4/ippiw-EULA.txt
-- Installing: /usr/local/share/licenses/opencv4/opencl-headers-LICENSE.txt
-- Installing: /usr/local/include/opencv4/opencv2/cvconfig.h
-- Installing: /usr/local/include/opencv4/opencv2/opencv_modules.hpp
-- Installing: /usr/local/lib/pkgconfig/opencv4.pc
but inside the container /usr/local
I dont see opencv
Final edit:
Could not figure out how to do this, but instead wrote a CMakeLists.txt file and used cmake and could build the sample