5

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
  • 51
  • Does libpng-dev not work for you? Why do you specifically need libpng12-dev? – Archisman Panigrahi Apr 24 '22 at 14:10
  • In fact I am trying to install a driver for an old ip2600 canon printer. The driver provided by Canon depends on libpng12. The generic driver (gutenprint) installed automatically does'nt work. – Joel Apr 24 '22 at 19:42
  • Can you share the driver? Maybe it would work with libpng, and we can engineer its dependencies. (libpng12 was a very old package and Canon may not have updated the driver). – Archisman Panigrahi Apr 25 '22 at 03:47
  • Sure, here is the driver https://app.box.com/s/1qky5ib0mlyhyn7760fu1fo9kuxyiyj1 It was packaged for 32-bit but it worked on 64-bit with multiarch support. There was allready a dependancy issue wit libcupsys2 which was solved by the script provided here : https://ubuntuforums.org/showthread.php?t=1427098&page=2 – Joel Apr 26 '22 at 05:40
  • 1
    Hey, check if this answer works. https://askubuntu.com/a/1240162/124466 – Archisman Panigrahi Apr 27 '22 at 08:38
  • I also tried to change the dependency in the .deb file, but could not repackage it once again because the libraries are in i386, whereas my Ubuntu is amd64. – Archisman Panigrahi Apr 27 '22 at 08:39
  • I just tried the answer askubuntu.com/a/1240162/124466 you proposed. The packet is installing fine and there are more printers available in the driver database after the installation is completed, but still not my ip2600 printer. I have tried selecting a driver for ip200 or ip 2700 but printing doesn't work. – Joel Apr 28 '22 at 05:45

3 Answers3

12

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
Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • Thanks, but it seems to fail in my case : libpng12-dev conflicts with libpng-dev libpng-dev:amd64 (version 1.6.37-3build5) is present and installed. libpng-dev:i386 (version 1.6.37-3build5) is present and installed. – Joel Apr 24 '22 at 12:20