5

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?

1

1 Answer 1

6

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://archive.ubuntu.com/ubuntu/pool/main/j/jasper/libjasper-dev_1.900.1-debian1-2.4ubuntu1.3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/j/jasper/libjasper1_1.900.1-debian1-2.4ubuntu1.3_amd64.deb

sudo apt-get install ./libjasper-dev_1.900.1-debian1-2.4ubuntu1.3_amd64.deb ./libjasper1_1.900.1-debian1-2.4ubuntu1.3_amd64.deb
2
  • 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. Oct 1, 2018 at 13:45
  • Edited my answer. Please try again
    – Arun
    Oct 1, 2018 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .