lbreakout2: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory [duplicate]
There is a PPA that has libpng12-0 for Ubuntu 20.04 LTS, 21.04 and 21.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.