Installing HPLIP for CUPS on a Raspberry Pi

If you have a HP printer or scanner and you want to be able to use it on your Raspberryi Pi running the Raspbian operating system, you`ll have to install HP Linux Imaging and Printing and CUPS.

In the terminal run the following commands:

sudo su
apt-get update
apt-get install hplip cups
usermod -a -G lpadmin pi

In a browser, on the raspberry pi you can now access the CUPS configuration screen at http://127.0.0.1:631/

If you also would like to use your MFP/scanner also run the following commands in the terminal:

apt-get install sane
sane-find-scanner

The configuration and applications are up to you, the requirements are now installed.

20 thoughts on “Installing HPLIP for CUPS on a Raspberry Pi

      • When you install your printer sometimes it may need proprietary plugin specially in case of some HP Printers. Like mine HP M1136 MFP needed it.

        One thing that you need to make sure on raspberry pi that since root is disabled, I will suggest you to run
        $sudo hp-plugin
        since it needs root privileges to install this plugin.
        Without the plugin my printer was not bale to print.

  1. I am happy today (2/18/19), my HP ENVY 7640 fis finally working with your installation proceedures. It is much simpler than downloading the file “hplib-3.19.1.run and time
    consuming plus doesn’t work.

  2. Worked first time. I had installed and launched CUPS earlier but the HP Deskjet 3050A printer wasn’t in the list. After install hplip and a reboot, then there it was in the CUPS list!
    That’s it, I’m now free of Windows 10, and the printer hanging whenever it feels like it, even on USB. And no more waiting One Drive synch driving me mad, and no more Outlook 365 monthly subscription!

  3. This works great except hplip-3.16.11 is loaded and not the latest drivers to be found in hplip-3.19.12. As others have said, hplip-3.19.12.run doesn’t work.

  4. Your method works !!!
    Others were time consuming, not to mention they fail …
    Thank you !!!

  5. Is it possible that hp-plugin is no longer supported ?
    I try to download it, but I went through something :
    ‘Checking for network connection…’ (few minutes waiting…)
    ‘Download plugin from : ‘ (nothing here)
    ‘Dowloading plugin : ‘ (hang here)
    (then : )
    “Receiving digital keys: /usr/bin/gpg –homedir /home/pi/.hplip/.gnupg –no-permission-warning –keyserver pgp.mit.edu –recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9

    error: Unable to recieve key from keyserver”

    (Or they changed the authentification system…)

  6. This was really helpful!

    Because my RBP is only network accessible, so no screen or keyboard attached, I had to run the following commands:

    $ sudo cupsctl –remote-any
    $ sudo /etc/init.d/cups restart

    After that the Cups interface was accessible through xxx.xxx.xxx.xxx:631 (replace the x with the IP of the RPB)

    I was about the buy a new printer due my old HP D1600 series not compatible anymore with the latest Mac OSX, so thanks for this! 🙂

  7. Printing works just fine.

    HP smart tank plus 570 scanner not recognized by sane, should I use xsane? Scanner shows up from command “sane -L”

    How do you approche the scanner from W10 client when succesfull connected?

Leave a Reply

Your email address will not be published. Required fields are marked *