The system discover the device. But i can not print.

But i can not install the drivers . I already download them from the official Canon web page. when i execute ./install this is the output.


Canon Inkjet Printer Driver Ver.3.40-1 for Linux Copyright CANON INC. 2001-2010 All Rights Reserved.

================================================== An error occurred. The package management system cannot be identified.

i also try to add manual the PPD file but i get other error :

Idle - File "/usr/lib/cups/filter/pstocanonij" not available: No such file or directory

2 Answers 2


Open the terminal and use these lines:

  1. Check if you have gdebi installed:

    which gdebi

if not, then:

sudo apt install gdebi-core gdebi
  1. Add the Ubuntu Trusty Extra Packages Repo

    sudo su

If Got “User is Not in Sudoers file” then Look: Solution

echo 'deb http://cz.archive.ubuntu.com/ubuntu trusty main universe' 
> /etc/apt/sources.list.d/extra.list

$ apt update
  1. Install packages:

    sudo apt install libpng12-0 libpango1.0-0

.. 4. Extract the Canon package in the /tmp directory enter image description here

  1. Install the package with

    cd /tmp/cnijfilter*deb/packages

if 32-bit system:

sudo gdebi ./*i386.deb

if 64-bit system

sudo gdebi ./*amd64.deb
  1. Installing Canon MG5150 Printer Driver

    cd /tmp/cnijfilter*deb

    sudo ./install.sh

You can be asked to connect or turn on the printer: enter image description here

  1. Finally, go to settings, to Add a Printer

It should be recognized and installed:

enter image description here

  • Hello Grigor, thanks for the instruction, Its was rely helpful . I fallow all the steps expect: sudo apt install libpng12-0 libpango1.0-0 because i get an error: Package libpng12-0 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Now i moved forward :) one step. Now i see the printer, i start the test page, there is no errors, but nothing happened. It didnt print :/ Any clues ?
    – IMS
    May 2, 2020 at 15:14
  • try $ sudo /etc/init.d/cups restart and then $ sudo /usr/sbin/lpadmin -p MG5100 -m canonmg5100.ppd -v cnijusb:/dev/usb/lp0 -E and last line - $ sudo /usr/sbin/lpadmin -d MG5100
    – Grigor
    May 2, 2020 at 16:38
  • unfortunately something goes wrong :/ '~$ sudo /usr/sbin/lpadmin -p MG5100 -m canonmg5100.ppd -v cnijusb:/dev/usb/lp0 -E [sudo] password: lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS. lpadmin: Unable to copy PPD file.'
    – IMS
    May 2, 2020 at 18:27

In search of a solution for Kubuntu 20.04.2 LTS I stumbled upon another answer to this question. While it may still apply, I had problems to install required older library versions alongside newer versions.

On a French Ubuntu forum thread I found the solution to add a certain PPA. Here are the detailed steps which led to a successful print:

  1. Verify, that your printer is supported. The MG5150 is supported according to this French list.

  2. The PPA is maintained on Launchpad here. It tells you to add the PPA as follows. Keep in mind that you must trust the PPA owner with what they offer:

sudo add-apt-repository ppa:thierry-f/fork-michael-gruz
sudo apt-get update
  1. Once that is done, you can check the list in step (1) again to see, which packages you need to install now. For the MG5150 this was required:
sudo apt-get install cnijfilter-mg5100 scangearmp-mg5100
  1. After that, the printer (connected via USB) got automatically detected by the system and opening the printer settings allowed me to print a test page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.