OpenCV installation error
Closed this issue · 4 comments
rickwierenga commented
I'm trying to install opencv using the commands specified in the wiki:
sudo apt-get install -y cmake
sudo apt-get install -y unzip
wget https://github.com/opencv/opencv/archive/3.2.0.zip
unzip 3.2.0.zip
rm 3.2.0.zip
cd opencv-3.2.0
mkdir build
cd build
cmake -DWITH_TBB=ON -DWITH_XINE=ON ..
make -j8
sudo make install
sudo ldconfig
But I get this error:
In file included from /home/rickwierenga/dir/opencv-3.2.0/modules/core/src/hal_internal.cpp:49:0:
/home/rickwierenga/dir/opencv-3.2.0/build/opencv_lapack.h:2:10: fatal error: LAPACKE_H_PATH-NOTFOUND/lapacke.h: No such file or directory
#include "LAPACKE_H_PATH-NOTFOUND/lapacke.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
modules/core/CMakeFiles/opencv_core.dir/build.make:522: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o] Error 1
CMakeFiles/Makefile2:1289: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I'm on Ubuntu 18.04 LTS.
Thanks in advance.
YuvalNirkin commented
Try:
sudo apt-get install liblapacke-dev checkinstall
lukexyz commented
Also after line
cmake -DWITH_TBB=ON -DWITH_XINE=ON ..
I needed to change the file pointer here
nano ~/opencv-3.2.0/build/opencv_lapack.h
changing line
#include "LAPACKE_H_PATH-NOTFOUND/lapacke.h"
into
#include "/usr/include/lapacke.h"
(which is the library installed with apt-get above)
Then continuing with
make -j8
YuvalNirkin commented
CMake should have found the library after you installed it. Try to clear the cache.
lukexyz commented
@YuvalNirkin how's the code going for FSGAN?