Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mint updater fails after installing Canon printer drivers

I'm using linux Mint 17.2 "Rafaela". Today I installed drivers for Canon iP2700 series. The drivers' deb package relied on "libtiff4" package, but system uses "libtiff5", so I forced the installation with

sudo dpkg --force-depends -i cnijfilter-*

It worked: the printer works perfectly but mint updater fails to update, it says "cnijfilter-ip2700series package will be removed". Of course I don't want to remove it. What shall I do?

One more thing: if I do

sudo apt-get dist-upgrade

I get something like (I'm translating from spanish) "cnijfilter-ip2700series has unresolved dependencies: Depends: libtiff4 but is not possible to install. Try to use -f option"

and if I do

sudo apt-get -f dist-upgrade

it says "cnijfilter-ip2700series will be removed"

Anyway, I prefer to use mint updater since apt-get seems to disrupt system settings, so I would prefer a solution that relies on mint updater.

like image 816
Attilio Avatar asked Sep 25 '16 05:09

Attilio


1 Answers

The system thinks that your installation of cnijfilter it is broken, because it has a missing dependency. Since it is unsatisfiable, suggesting to uninstall the package is actually a quite good solution.

You have multiple options:

  • It appears that you can download the source of the driver and compile it yourself.

  • A simpler solution is download & manally install a package for libtiff4, either from Ubuntu or Debian. Both versions of the package should be installable on your system (without unsatisfiable dependencies). This is what I did on my (also mint, also with these Cancon drivers) system.

  • You can patch the dependency out of the package to make apt think that everything is fine. The applications within the package that rely on libtiff4 will be broken, of course, but the actual driver (/usr/lib/cups/backend/cnijusb) is not one of them. Patching it is quite easy:

    # Unpack the deb package:
    $ ar x cnijfilter-..._amd64.deb
    # This will create 3 files: data.tar.gz, control.tar.gz and debian-binary
    
    # Unpack control.tar.gz:
    $ mkdir DEBIAN
    $ cd DEBIAN
    $ tar xzf ../control.tar.gz
    
    # Edit the newly created control file:
    $ your_favorite_editor control
    # now, in the editor, remove the libtiff4 dependency from the Depends line
    
    # Repack everything into a new deb file:
    $ rm ../control.tar.gz
    $ tar czf ../control.tar.gz *
    $ cd ..
    $ ar r cnijfilter-..._amd64.deb contol.tar.gz
    

    Afterwards, your updated deb file does no longer have libtiff4 as a dependency. Let apt uninstall the installed version such that it no longer complains, and then install your newly created package.

like image 148
Phillip Avatar answered Oct 20 '22 08:10

Phillip