Ask Your Question

fata error: LAPACKE_H_PATH-NOTFOUND when building OpenCV 3.2

asked 2017-01-08 02:50:56 -0500

adiperry gravatar image

updated 2017-01-08 08:10:07 -0500

LBerger gravatar image


I get this error when building OpenCV 3.2:

In file included from /home/username/opencv-3.2.0/opencv/modules/core/src/hal_internal.cpp:49:0: /home/username/opencv-3.2.0/opencv/build/opencv_lapack.h:2:45: fatal error: LAPACKE_H_PATH-NOTFOUND/lapacke.h: No such file or directory #include "LAPACKE_H_PATH-NOTFOUND/lapacke.h"

LAPACK and BLAS are installed.. Any ideas? Didn't get these errors with 3.1 or previous 2.4.X versions...

Thanks, AP

edit retag flag offensive close merge delete


LAPACKE_H_PATH-NOTFOUND it is like a cmake message.

Does cmake find lapack?

LBerger gravatar imageLBerger ( 2017-01-08 02:53:27 -0500 )edit

I was surprised to find it within include statement.. And yes, look like it does.

--     Use IPP Async:               NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Lapack:                  YES (/usr/lib/
--     Use Eigen:                   YES (ver 3.2.0)
--     Use Cuda:                    YES (ver 7.5)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
adiperry gravatar imageadiperry ( 2017-01-08 03:01:09 -0500 )edit

I'm using vs 2015 with mkl lapack so I cannot test. May be you can try to set LAPACK_INCLUDE_DIR with your own path in cmake process.

Don't forget to delete cmakecache

Wait some comments about your problem and If you cannot solve it post an issue.

In opencv 3.2 many things change about lapack and blas see

LBerger gravatar imageLBerger ( 2017-01-08 03:16:25 -0500 )edit


I think I had the same issue. Could you try to install:

sudo apt-get install liblapacke-dev checkinstall
Eduardo gravatar imageEduardo ( 2017-01-08 07:02:05 -0500 )edit

It seems to fix this failure. I'm getting other failures, like mentioned here: Which also suggests it's LAPACK-related. (Ubuntu 14.04 with CUDA)

When setting "WITH_LAPACK=OFF" it works.

adiperry gravatar imageadiperry ( 2017-01-09 04:46:29 -0500 )edit


If you're using something like ( from

The fix is to replace the line




AlexLamson gravatar imageAlexLamson ( 2017-01-11 21:34:16 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2017-03-03 01:58:25 -0500

lccurious gravatar image

You can do sudo apt-get install liblapacke-dev checkinstall And then modify the #include "LAPACKE_H_PATH-NOTFOUND/lapacke.h" into #include "lapacke.h" and make, It works in my Ubuntu.

edit flag offensive delete link more

answered 2017-03-29 10:56:55 -0500

Akashunni gravatar image

Install openBLAS

sudo apt-get install libopenblas-dev

Replace LAPACKE_H_PATH-NOTFOUND with /opt/OpenBLAS/include

Solved my problem by doing this..!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-01-08 02:50:56 -0500

Seen: 4,929 times

Last updated: Jan 08