I installed Debian OS on Rpi. While installing opencv, I create "opencv.pc" file in "/home/pi/Opencv-2.4.3/release/lib". Then I entered following two commands:
sudo gedit /etc/bash.bashrc
Add the following two lines to the “bash.bashrc” file and save the file:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/pi/Opencv-2.4.3/release/lib/pkgconfig
export PKG_CONFIG_PATH
Then I got following errors after entered these commands:
chmod +x build_all.sh
/build_all.sh
What is the solution?
errors are..
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
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
contours.c:1:39: fatal error: opencv2/imgproc/imgproc_c.h: No such file or directory
compilation terminated.
compiling convert_cascade.c
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..etc..
To add the correct path to your bashrc you can do the following steps
sudo find / -name "opencv.pc" -type f
notice the directory output from 1. (without filename)
open /etc/bash.bashrc sudo vi /etc/bash/bash.bashrc
find and edit or add the following lines
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/your/path/from/#1
export PKG_CONFIG_PATH
save your file :wq
logout and login again to active the changes
Related
On my Yocto image (with .deb packaging) i set up sudo an it work's fine. Only when i try to install a .deb package with:
sudo dpkg -i package-name.deb
It results in:
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
I already did as workaround in /etc/sudoers manually:
## Uncomment to use a hard-coded PATH instead of the user's to find commands
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
And after that sudo dpkg worked
The question now is:
How to do it in yocto build to have this solved out of the box ? How can I change the /etc/sudoers file to have this setup as default in the build? Or are there any other solutions ?
Thank's a lot for any help
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'to the
PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-2.0', not found
I don't know how to fix it. Please help me out.
I have the same problem here under OSX by trying to install PyGObject.
I already have libffi.pc on my pc (in /usr/local/opt/libffi/lib/pkgconfig) and I added the PKG_CONFIG_PATH in my .bash_profile
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
but the installation still fails because it cannot find the file.
When it is saying to execute the command specified in https://github.com/lovell/sharp/issues/1603, where and when I have to do it?
I'm trying to build docker image, but I have this
app/utils
app/vendor/fifo/fifobuffer_v2
parkingDetection/pkgs/utils
app/pkgs/utils
app/vendor/github.com/stratoberry/go-gpsd
parkingDetection/gpsdata
gocv.io/x/gocv app/gpsdata
pkg-config --cflags 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
pkg-config:
exit status 1
apt-file search opencv.pc
gives me
libopencv-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/opencv.pc
echo $PKG_CONFIG_PATH
gives me
/usr/lib/x86_64-linux-gnu/pkgconfig/opencv.pc
How can I solve this problem?
I had a similar problem when I was trying to install a deep learning framework and this is how I fixed it:
Add the following to your .bashrc file:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig
export PKG_CONFIG_PATH
then run the .bashrc file by either
source ~/.bashrc
or
. ~/.bashrc
I hope it works for you.
So, I guess, I just can't build docker image, which uses ppencv without opencv on my pc
I am trying to install libqi for nao-ros and it gives me error: I already have gtest package but gtest_main is missing.
CMake Error at /home/shruti/d-prefix/share/cmake/qibuild/internal/uselib.cmake:80 (find_package): By not providing "FindGTEST_MAIN.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "GTEST_MAIN", but CMake did not find one.
Could not find a package configuration file provided by "GTEST_MAIN" with any of the following names:
GTEST_MAINConfig.cmake
gtest_main-config.cmake
Add the installation prefix of "GTEST_MAIN" to CMAKE_PREFIX_PATH or set "GTEST_MAIN_DIR" to a directory containing one of the above files. If "GTEST_MAIN" provides a separate development package or SDK, be sure it has been installed.
Any one knows about it?
I had the same problem when trying to build libqi and fixed it by:
cd /usr/share/cmake-3.0/Modules
ln -s FindGTest.cmake FindGTEST_MAIN.cmake
When I go with this command:
pkg-config --cflags opencv
I get the following message:
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'm on Cent OS 6, have found the solution for Linux Ubuntu over the internet and here on stack but not for Cent OS
I tried under OpenCV specifications with
PKG_CONFIG_PATH=/usr/share/opencv/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH
Still it doesn't work. How can I be sure OpenCV is also installed in that directory, I used whereis opencv and it triggered me /usr/share/
I know it is really late to answer to a question 4 years later but I will leave it here in hope that it will help someone.
I came also across a similar error after installing OpenCV 3.3.0 on Fedora 26. First, make sure you have the right path to your opencv.pc file. Mine is in this directory '/usr/local/lib/pkgconfig/'.
Run this command in your terminal. It will modify your .bashrc:
echo "#ADD OpenCV in PKG_CONFIG" >> ~/.bashrc
echo "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}" >> ~/.bashrc
echo "export PKG_CONFIG_PATH" >> ~/.bashrc
Then execute:
source ~/.bashrc
Hi first of all i would like you to use 'Synaptic Package Manager'. You just need to goto the ubuntu software center and search for synaptic package manager.. The beauty of this is that all the packages you need are easily available here. Second it will automatically configures all your paths. Now install this then search for opencv packages over there if you found the package with the green box then its installed but else the package is not in the right place so you need to reinstall it but from package manager this time. If installed then you can do this only, you just need to fill the OpenCV_DIR variable with the path of opencv (containing the OpenCVConfig.cmake file)
export OpenCV_DIR=<path_of_opencv>