I tried to install WPS Office on my laptop (ubuntu 16.10 Gnome, 64 bit) with Gdebi installer but it said

Dependency is not satisfiable: libpng12-0

Then I tried to open this library as follows

sudo apt-get install libpng12-0

But I encountered an error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libpng12-0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

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

Can anyone help? Thanks a lot

3 Answers 3


You can download the libpng12-0 package from here:

I had the same dependency problem. But downloading and installing fix edthe error. Ubuntu 16.10 killed these libs jeje.

  • wow. it worked. thanks a lot. It took me the whole day!
    – Garp
    Oct 21, 2016 at 23:49
  • 1
    following the instruction at the link to add the mirror to your sources worked for me
    – n8sty
    Sep 11, 2017 at 17:57
  • 1
    Running Xubuntu 17.10. This solution didn't work for me. After installing libpng12-0 this way, the TeamViewer install (what I'm really trying to install) still thinks libpng12-0 is not installed. Do I need to update a database somewhere? Jan 26, 2018 at 22:36
  • This answer doesn't set up correct package pinning. You need to do this (unfortunately can't post as an answer cause lack of rep): Package: * Pin: release n=xenial Pin-Priority: -10 Package: libpng12-0 Pin: release n=xenial Pin-Priority: 500 Jun 13, 2019 at 15:57
  • 1
    deadlink, please fix
    – stiv
    Sep 23, 2019 at 11:19

Downloading and manually installing a package is not the recommended way of doing things in ubuntu, it is strongly suggested to use a package manager like aptitude or synaptic to download and install packages.

To do it in the command line first you have to add a repository. This involves modifying /etc/apt/sources.list so you must create a backup

Open a Terminal window

sudo nano /etc/apt/sources.list

At the top of the list add

#### BACKUP for /etc/apt/sources.list created <insert date here>

press ctrl+o to save the file to a new location. I have a folder in my home directory for backups, but you can put it anywhere you will remember that it exists. For my backup folder I saved it as /home/USERNAME/os_file_backups/backup_03-06-17_apt-sources.list hit enter to save, it will ask you if you want to save it with a different name press y to save the file and then ctrl-x to exit nano

once again go back to sources.list

sudo nano /etc/apt/sources.list

at the bottom of the file add

#### Manually Added sources
## source for libpng12-0 package
deb http://mirrors.kernel.org/ubuntu/ xenial main

^note for above, mirrors.kernel.org is one of many mirrors that can be used. You can replace mirrors.kernel.org/ubuntu with any of the mirrors listed at http://packages.ubuntu.com/xenial/amd64/libpng12-0/download that you wish to use

press ctrl+x and hit yes to save the file

now to update the package list

sudo apt-get update

and install the package

sudo apt-get install libpng12-0

shazam you have added libpng-12-0 using apt so you will get updated packages whenever you run apt-get upgrade

  • 3
    This solution doesn't work in Xubuntu 17.10. The mirror is not recognized. Jan 26, 2018 at 22:32
  • 1
    Is there a solution available for Ubuntu 17.10? Feb 12, 2018 at 9:36
  • 1
    @M.AtifRiaz This issue was part of a problem I was having with Ubuntu 17.10. I posted a more generalized question and included what seems to be a solution to the libpng issue. Maybe that will help?
    – drmuelr
    Feb 13, 2018 at 1:36
  • 1
    For me on Ubuntu 17.10 installing wps-office was successful after installing libpng through sudo apt-get install libpng-dev command Feb 14, 2018 at 12:03
  • After loads of faffing about on Xubuntu Bionic This one worked for me! Thanks.
    – barry
    Oct 2, 2018 at 14:59

This also happen when you try to install incompatible package with your distro (like install trusty .dep package on bionic).

You must log in to answer this question.

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