Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCV installation error #51

Closed
rickwierenga opened this issue Oct 9, 2019 · 4 comments
Closed

OpenCV installation error #51

rickwierenga opened this issue Oct 9, 2019 · 4 comments

Comments

@rickwierenga
Copy link

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
Copy link
Owner

Try:

sudo apt-get install liblapacke-dev checkinstall

@lukexyz
Copy link

lukexyz commented Oct 11, 2019

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
Copy link
Owner

CMake should have found the library after you installed it. Try to clear the cache.

@lukexyz
Copy link

lukexyz commented Oct 12, 2019

@YuvalNirkin how's the code going for FSGAN?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants