For ScreenLets application I need to install libpng12-0 package on the Ubuntu 19.10 system.

I know that it is available only for Ubuntu 16.04 LTS.

So I have decided to download this package manually and install it by hand.

On previous Ubuntu versions (such as 18.04 LTS) this trick ends with success, but here on 19.10 it fails in very strange way:

wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
sudo apt-get install ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/116 kB of archives.
After this operation, 285 kB of additional disk space will be used.
Get:1 /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb libpng12-0 amd64 1.2.54-1ubuntu1.1 [116 kB]
Selecting previously unselected package libpng12-0:amd64.
(Reading database ... 212864 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...

dpkg: error processing archive /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (--unpack):
 unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

What is wrong here? How can I get libpng12-0 installed on Ubuntu 19.10 system?

Note: the same happens on 19.04, but it is near EOL.

1 Answer 1


There is a PPA that has libpng12-0 for Ubuntu 20.04 LTS, 21.04, 21.10, 22.04 and 22.10: https://launchpad.net/~linuxuprising/+archive/ubuntu/libpng12.

You can either download the libpng12-0 deb from here or add the PPA:

sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt update
sudo apt install libpng12-0

The reason the old libpng12-0 doesn't work in Ubuntu 19.04 (and newer) is that with Ubuntu 19.04, the /lib directory is a symlink to /usr/lib because of usrmerge (this was not the case with Ubuntu 18.04 and older), and this causes the libpng12-0 installation to fail, since this package tries to create a link from /lib/x86_64-linux-gnu/libpng12.so.0 to /usr/lib, which is already a symlink. So the libpng12-0 DEB had to be repacked to fix this issue and get it to install.

Source: Linux Uprising.

  • 2
    Thanks for creating PPA and these packages for me :) It is really great. I also suspected the symlinks to be a real problem.
    – N0rbert
    Dec 7, 2019 at 14:14
  • 1
    Thanks Logix. Just wondering if there is a plan to do a release for 22.04 LTS?
    – mwfearnley
    May 10, 2022 at 10:01
  • 1
    mwfearley: is that why it comes up "no installation candidate" when I try it on 22.04 ?
    – Robin
    Dec 6, 2022 at 9:13
  • 1
    @Robin I've updated the PPA, it now works on Ubuntu 22.04 too.
    – Logix
    Jan 13 at 4:25
  • Eh, so, what about aarch64, are we simply out of luck? :)
    – Ecuador
    Feb 12 at 13:09

You must log in to answer this question.

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