9

I need to install lipng12-0 on ubuntu 22.04 to make an old Canon printer work.

On 20.04, I followed the instructions given here : How to correctly install libpng12-0 on the Ubuntu 19.10?

But it seems to no longer work for ubuntu 22.04.

Any ideas to make it work on ubuntu 22.04 ?

Joel
  • 91

3 Answers3

17

I am in the same boat as you. I recommend compiling from scratch given the source code in the PPA. Basically, this should do what you want it to do. It installs essential packages to build, makes a source folder, gets the source, extracts the source, configures the build environment, builds the library, installs the library and set up the necessary symlinks in /usr/lib.

sudo apt install build-essential zlib1g-dev
cd
mkdir src
wget https://ppa.launchpadcontent.net/linuxuprising/libpng12/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz
tar Jxfv libpng_1.2.54.orig.tar.xz
cd libpng-1.2.54
./configure
make
sudo make install
sudo ln -s /usr/local/lib/libpng12.so.0.54.0 /usr/lib/libpng12.so
sudo ln -s /usr/local/lib/libpng12.so.0.54.0 /usr/lib/libpng12.so.0

Hopefully this helps you get that legacy app running. Good luck!

2

I use a Canon Pixma 8250/8200 Series with Ubuntu 22.04.

Like Archisman Panigrahi mentioned in a comment above, the solution from user1083006 works for me and is very easy:

For Canon Pixma MG4250 and other "old" Canon printers, the package cups-backend-bjnp is needed. First install it:

sudo apt install cups-backend-bjnp

Then your printer will be avaliable in Ubuntu's list of printers. And you may change the color model to KCMY.

1

Since the PPA does not yet have packages for Jammy, you can manually install the version for Impish.

Open a terminal and enter the following commands one by one. These commands will download the .deb packages from Launchpad, and install them manually.

mkdir libpng
cd libpng
wget https://launchpad.net/~linuxuprising/+archive/ubuntu/libpng12/+files/libpng12-0_1.2.54-1ubuntu1.1+1~ppa0~impish0_amd64.deb
wget https://launchpad.net/~linuxuprising/+archive/ubuntu/libpng12/+files/libpng12-dev_1.2.54-1ubuntu1.1+1~ppa0~impish0_amd64.deb
wget https://launchpad.net/~linuxuprising/+archive/ubuntu/libpng12/+files/libpng3_1.2.54-1ubuntu1.1+1~ppa0~impish0_amd64.deb
sudo dpkg -i *.deb
sudo apt install -f