Fix libpng12-0 Missing In Ubuntu 18.04, 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.

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 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 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


To fix the issue, download the libpng12-0 package for your architecture (you only need one of these, specific for your Ubuntu 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.

3 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

Powered by Blogger.