Ubuntu – Error installing libjasper-dev and libpng12 package in ubuntu 19.04

aptpackage-management

I tried to install libjasper-dev and libpng12 for opencv but I'm getting this error:

E: Unable to locate package libjasper-dev
E: Unable to locate package libpng12

I also tried installing libpng16 but still I was getting the same error. How can I solve this problem?

Best Answer

To install libjasper-dev using below:

Add the following line to /etc/apt/sources.list:

deb http://ftp.fau.de/trinity/trinity-builddeps-r14.0.0/ubuntu/ bionic main

Install GPG key of the repository:

# sudo apt-key adv --keyserver keyserver.quickbuild.io --recv-keys F5CFC95C

Update the package index:

# sudo apt-get update

Install libjasper-dev deb package:

# sudo apt-get install libjasper-dev

Reference https://ubuntu.pkgs.org/18.04/trinity-r14-builddeps-i386/libjasper-dev_1.900.1-debian1-2.5ubuntu18.04.0+5_i386.deb.html

To install libpng12 refer below link

E: Package 'libpng12-0' has no installation candidate [ubuntu 16.10 Gnome]

Related Question