3

I am trying to build Opencv on Ubuntu 18.04.

When I run make I get the error:

grfmt_jpeg2000.cpp:59:10: fatal error: jasper/jasper.h: No such file or directory
 #include <jasper/jasper.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.

I had already jasper installed and installed libjasperreports-java. However the file jasper.h cannot be found in my system. Is there any library I can install with apt install to get that file?

4

jasper.h is part of the libjasper-dev package. This package is not available in Ubuntu 18.04. So try downloading it and install using

cd ~/Downloads
wget http://security.ubuntu.com/ubuntu/pool/main/j/jasper/libjasper-dev_1.900.1-debian1-2.4ubuntu1.2_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/j/jasper/libjasper1_1.900.1-debian1-2.4ubuntu1.2_amd64.deb
sudo apt-get install ./libjasper-dev_1.900.1-debian1-2.4ubuntu1.2_amd64.deb ./libjasper1_1.900.1-debian1-2.4ubuntu1.2_amd64.deb
  • I get this error The following packages have unmet dependencies: libjasper-dev : Depends: libjasper1 (= 1.900.1-debian1-2.4ubuntu1.2) but it is not installable E: Unable to correct problems, you have held broken packages. – Francesco Boi Oct 1 '18 at 13:45
  • Edited my answer. Please try again – Arun Oct 1 '18 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.