I have tried installing opencv on arch using the aur package. It has successfully installed but when I try to import opencv2 in python, I get the following error
ImportError: libhdf5.so.100: cannot open shared object file: No such file or directory
Not just python , even when I tried running a c++ sample code using this, I got the same error. I have tried searching the net, found a few people who faced a similar issue but still I am unable to fix it.
I have installed Open CV version 3.2
There are multiple packages with similar names but only one that works.
If you have not yet installed OpenCV, run:
pacman -S opencv
pacman -S python-opencv
Install hdf5:
pacman -S hdf5
Note that instructions for Sikuli, which depends on OpenCV, indicate that a symbolic link is required in /usr/lib
. A system upgrade can break the link, which will have to be recreated to point to the most recent version of the OpenCV Java library:
# ls -la /usr/lib/libopencv_java*
-rwxr-xr-x 1 root root 2225952 Jul 18 02:48 /usr/lib/libopencv_java440.so
lrwxrwxrwx 1 root root 20 Aug 5 22:42 /usr/lib/libopencv_java.so -> libopencv_java440.so
This can be accomplished using the ln
command:
sudo su -
cd /usr/lib
rm libopencv_java.so
ln -s libopencv_java440.so libopencv_java.so