E: Package 'libpng12-dev' has no installation candidate

I use Ubuntu 18.04 bionic and I get this error message when I try to install libpng12-dev package.

How can I solve it?


Solution 1:

The package libpng12-dev was dropped after 16.04. It's been gone a long time.

Try libpng-dev.