How to install hplip on Ubuntu 20.04

IMPORTANT UPDATE 2020/09/01: At the end of this process, your current Virtualbox installation may be broken. You should try to reinstall it following these steps:

1) Purge the Virtualbox packages

$ sudo apt purge virtualbox
$ sudo apt remove virtualbox-dkms
$ sudo apt autoremove

2) go to the following website
3) choose and install the most appropriate deb package
4) reinstall Virtualbox

$ sudo apt install virtualbox


If you are here, you probably tried to install hplip without success. The installation of hplip on Ubuntu 20.04 is quite hard due to the old library pyqt5 used by standard hplip package.

Anyway if you pay attention, on the developer website, there’s a section named “Advanced Option” that could help you.

Let’s try with the installation.

First of all you have to remove and purge the hplip package already installed on your system.

Then let’s install the following package:

$ sudo apt install python-dev-is-python3/focal 

Then download the hplip tar package from here or run:

$ wget

Untar it and run the installer:

$ mv download hplip-3.20.9.tar.gz
$ tar -xvf hplip-3.20.9.tar.gz
$ cd hplip-3.20.9
$ ./hplip-install

Follow the most appropriate wizard and be patient…pay attention to each installation step and read carefully what the wizard is saying…if you face some exceptions (network or gui exceptions) please retry the command.

At the end of the wizard if you don’t find any problem the package has been installed.

Afterwards you are asked to setup the printer with the desired connection method: follow the wizard till the end. If the process fails somewhere you don’t have to reinstall the hplip package but run:

$ hp-setup

To scan a document you have to run

$ hp-scan

A window will be promped up asking for the driver installation.

Please follow the wizard and be patient….if the process fails restart it with the same command. At the end rerun the previous command and you will be ready to scan.

If you find any other problem please share it here.

HaPpy scanning!

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

10 thoughts on “How to install hplip on Ubuntu 20.04”

  1. Hi Edoardo,
    Thanks for the page and providing me its link. Would you please mind giving simple steps as I am kind of a novice to Ubuntu. 😉 I hardly open the Terminal. If something goes wrong, I am not able to refix it. Hope, you’d understand. How to ‘untar’ and ‘jump into the directory’ as you say in step 3?

    1. Hi kamyogi, I updated the post with the information that you requested 🙂
      I would suggest you to learn more about Bash and Ubuntu, in this way you can understand exactly what you are running and how to fix any problem 😉

  2. Thank you for this method, I’ve seen others that seem to “unlink” and “link” to different directories, making it very difficult for a new user, or it might break after an update. HOWEVER, I found a different problem. By replacing the python version (so hplip can work), but now, that breaks Virtualbox! Since I use Virtualbox more than the printer, I have to re-install (fortunately, from backup image).

    So, either I test hplip / printing from INSIDE Virtualbox (and so don’t break the Host), or I have to print from Windows (e.g. old laptop). Thanks again.

    1. You are welcome!
      I’m personally running Python 3.8.5 and VirtualBox 6.1.16 without any compatibility problem. Please feel free to share with us causes and fixes about your issue 🙂

    2. Hi Chris, I tried to replicate your problem.
      I found a fix that worked for me.
      You can find it at the top of this post.
      Let me know.

  3. Absolutely Perfect – Thank you! I originally could not get HPlip to function or load. HP directions did not work. You solved the problem. Ubuntu 20.04 working with my HP ENVY 6055 printer wirelessly!

  4. Unfortunately I get the following errors (any hint?)
    error: A required dependency ‘libjpeg (libjpeg – JPEG library)’ is still missing.
    error: A required dependency ‘libpthread (libpthread – POSIX threads library)’ is still missing.
    error: A required dependency ‘libusb (libusb – USB library)’ is still missing.
    error: A required dependency ‘libnetsnmp-devel (libnetsnmp-devel – SNMP networking library development files)’ is still missing.
    error: A required dependency ‘libcrypto (libcrypto – OpenSSL cryptographic library)’ is still missing.
    error: A required dependency ‘sane (SANE – Scanning library)’ is still missing.
    error: Installation cannot continue without these dependencies.
    error: Please manually install this dependency and re-run this installer.

    1. Hi Flavio, it seems that are missing some dependencies on your OS.
      Please try to install all of them running:

      sudo apt install build-essential
      sudo apt install libjpeg-dev
      sudo apt install libtool-bin
      sudo apt install libpthread-stubs0-dev
      sudo apt install libusb
      sudo apt install libsnmp-dev
      sudo apt install openssl
      sudo apt install sane
      sudo apt install sane-utils

      Then try again to install hplip and let me know.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.