Fix libpng12-0 Missing In Ubuntu 18.04 Or 18.10, Preventing Apps Like WPS Office From Installing

In this article you'll find a very easy to apply fix that will allow installing and running applications that depend on libpng12-0 in Ubuntu 18.04 LTS (or Linux Mint 19, which is based on Ubuntu 18.04), as well as Ubuntu 18.10. This applies to any Ubuntu or Linux Mint flavor: Kubuntu, Xubuntu, Ubuntu MATE, Ubuntu Budgie, Linux Mint Xfce, Linux Mint Cinnamon, etc.

The problem


libpng12 is no longer available in the Ubuntu repository archives and as a result, some applications that were not built with the newer libpng (libpng16) library fail to install. This issue is not new, since Ubuntu dropped libpng12 with version 16.10, but those whom are upgrading from Ubuntu 16.04 to 18.04 LTS or 18.10, as well as Linux Mint 19 users, might not be aware of this and how to fix it.

Here is an example. Ubuntu Software simply fails to install WPS Office, without displaying any error message, so I opened the WPS Office deb with gdebi-gtk, which doesn't allow the deb to install, displaying this message: "Error: Dependency is not satisfiable: libpng12-0":

libpng12-0 error Ubuntu

Trying to install the same deb from a terminal results in the following libpng12-0 error:

logix@logix-laptop:~$ sudo dpkg -i wps-office_10.1.0.5707_a21_amd64.deb 
[sudo] password for logix: 
Selecting previously unselected package wps-office.
(Reading database ... 354579 files and directories currently installed.)
Preparing to unpack wps-office_10.1.0.5707_a21_amd64.deb ...
Unpacking wps-office (10.1.0.5707~a21) ...
dpkg: dependency problems prevent configuration of wps-office:
 wps-office depends on libpng12-0; however:
  Package libpng12-0 is not installed.

dpkg: error processing package wps-office (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 wps-office

Note that some apps can't be installed due to missing libpng12-0, while others simply fail to start.

The fix: install and run applications that require libpng12-0 in Ubuntu 18.04, Ubuntu 18.10 or Linux Mint 19


To fix the issue, download the libpng12-0 package for your architecture (you only need one of these, specific for your Ubuntu / Linux Mint architecture):

Install the libpng12-0 deb downloaded by using the link above, and you should be able to install and run applications that still depend on this library, in Ubuntu 18.04 LTS or Ubuntu 18.10 / Linux Mint 19.

12 comments:

  1. Thanks, i had almost given up

    ReplyDelete
  2. While this solution applies to amd only, the page text implies neither architecture is left out. You might think about ammending that.

    ReplyDelete
    Replies
    1. You mean 64bit (as in amd64)? That's the architecture, it doesn't mean it doesn't work on Intel. Nothing is amd specific in this article. Also, there are download links for both 32bit and 64bit, all you have to do is download the package for your Ubuntu architecture and install it.

      Delete
  3. sorry, my mistake, it DID work after all !

    ReplyDelete
  4. Worked for me, thank you very much!

    ReplyDelete
  5. For a fully functional Epson scanner I had to install libjpeg9 & libjpeg62 to get jpeg/jpg support as well in Xubuntu 18.04

    ReplyDelete
  6. heyy.. I also have the same problem with 18.04. I downloaded libpng12-0, but there is not any .run file to install it!. how do I install it ?

    ReplyDelete
    Replies
    1. If you use Ubuntu... make sure you've downloaded the .deb and not some other file type, then just double click on it to install it.

      Delete
  7. Ty. I almost died searching for it

    ReplyDelete