Home Downloads Install HP Printer drivers in Ubuntu, Linux Mint, and elementary OS

Install HP Printer drivers in Ubuntu, Linux Mint, and elementary OS

by Kiran Kumar
Published: Last Updated on
Installing HP printer drivers on Ubuntu and elementary OS

HP Linux Imaging and Printing (HPLIP) is an HP-developed application for printing, scanning, and faxing with HP inkjet and laser-based printers connected to Linux computers. The HPLIP  includes print, scan, and fax support for 2594 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP.

Some of the tools that come with the HPLIP software include:

  • It contains an automated installer that is compatible with various Linux distributions.
  • It comes with a graphical toolbox and faxing application written in Qt. It provides the user with an interface to perform configurations, printing, and scanning.
  • A command-line utility to perform configurations, add devices, scan, and printing actions.

Checking if HPLIP is already installed

Most recent Linux distros come preinstalled with a version of HPLIP, but it’s possible that you may not have the latest one. First, it’s a good idea to check if your PC already has the latest HPLIP installed.

Launch ‘Terminal’ and enter the following command in it.

dpkg -l hplip

Uninstalling HPLIP

If this version is not the latest, you can uninstall it and install the latest version as described below. Even if you proceed without uninstalling, the HPLIP installer will prompt you that there is already a version available, and you can then choose to remove the old one and install the latest package. This command will remove HPLIP from your PC.

dpkg -r hplip

Before you start installing HPLIP, I suggest confirming if your HP printer is compatible with this application. You can look up your exact HP model number compatibility at their official webpage.

Installing HP Linux Imaging and Printing in Ubuntu, Linux Mint

This guide will also serve as a reference for those who want to reinstall HP drivers due to corrupted programs and broken packages. This section is only for Ubuntu and Linux Mint. Elementary OS users should hop on to the next section below.

STEP 1: Go to the official HP SourceForge webpage and download the HPLIP installer package. It should look something like hplip-3.16.11.run. The version number may be different in your case.

STEP 2: Go to ‘Applications’ or ‘Menu’ and launch ‘Terminal’.

STEP 3: I’m assuming that the downloaded hplip-3.16.11.run installer is in the ‘Downloads’ directory. Navigate into it using the cd command:

cd Downloads
HPLIP Installation

HPLIP Installation

STEP 4:  Use the list command to see the contents of the ‘Downloads’ directory.

ls

STEP 5: Run the installer using the sh command

sh hplip-3.16.11.run

STEP 6: Pay attention to ‘Terminal’ progress. Type ‘y’ and hit enter for automatic installation prompt followed by ‘a’.

STEP 7: It will confirm your current Linux distro. Enter ‘y’ and hit enter.

Linux Mint Terminal showing HPLIP installation

Linux Mint Terminal showing HPLIP installation

STEP 8: Enter your root password to continue the installation.

STEP 9: Press enter to continue.

STEP 10: It will ask if you would like to have this installer install the hplip specific policy/profile. Type ‘y’ and continue.

STEP 11: In this step, it will show you dependencies that are not installed. HPLIP will not work if all REQUIRED dependencies are not installed, and some of the HPLIP features will not work if OPTIONAL dependencies are not installed. Go ahead and type ‘y’.

Terminal showing Dependencies of HPLIP

Terminal showing Dependencies of HPLIP

STEP 12: The installer will automatically run the dpkg command for each of the dependencies to download and install them. It would help if you had an internet connection.

STEP 13: If your PC already has HPLIP installed, the installer will prompt you to remove and install or quit the installation. If you are upgrading HPLIP or reinstalling HPLIP, you should continue to remove and install.

STEP 14: The installer will automatically compile the package for you and run the commands ‘./configure’ and ‘make.’ You don’t need to do anything.

STEP 15: Enter ‘y’ when it prompts to keep HPLIP updated.

STEP 16: Printer drivers and imaging applications should be complete by this stage. The next step onward is more of connecting your computer to the printer and getting things working. Quitting any of the below steps won’t break drivers and applications that are already installed.

STEP 15: Your HP printer must now be connected to your PC and switched ON to continue from here in GUI mode. Enter ‘u’ and continue in GUI mode.

STEP 16: Select the Printer type.

Printer Connection Type

Printer Connection Type

STEP 17: Select the Printer to be configured.

STEP 18: Select the PPD file (or driver) to be used for your Printer. The PPD files, which are nothing but drivers similar to your printer, are displayed. Select the appropriate PPD file for your printer.

STEP 19: Confirm the Printer Settings and finish the configuration process.

STEP 20: Click  ‘AddPrinter’ to complete the printer setup process.

Installing HP Linux Imaging and Printing on elementary OS

As of writing this post, if you go, try using the .run file as in the above section, you will get a warning like “elementary distro is not found in AUTH_TYPES.” You will also come across a section where you need to select your Linux distribution. Here, you will notice that Elementary OS is not listed. See the image below.

Select OS

If you decide to select Ubuntu (Since Elementary OS is based on Ubuntu), you will get the error “INSTALL MISSING REQUIRED DEPENDENCIES.”

To overcome all these errors and install HPLIP on Elementary OS, we will use the apt package manager and not the hplip.run file. Follow the steps below:

Step 1. Launch the Terminal from the applications menu.

Step 2. Run the update and upgrade command to ensure all system packages are up-to-date.

sudo apt update
sudo apt upgrade

Step 3. Once the execution is complete, run the command below to install HPLIP.

sudo apt install hplip hplip-gui
Install HPLIP

Install HPLIP

If the execution completes successfully, HPLIP should be installed on your system.

Step 4. Navigate to the Applications menu and search for the HPLIP toolbox. Click on the application to open.

Launch HPLIP toolbox

Launch HPLIP toolbox

The HPLIP application will open. If you have not connected any HP printers or scanners, you will get an error like “No Installed HP Devices Found.” Alternatively, if you have an HP device such as a printer or scanner connected, click on the “Setup Device” button to set it up.

HPLIP Application

HPLIP Application

That’s it! We have successfully installed HP Printer drivers on elementary OS. If you come across any error while executing the commands above, please, let us know in the comment section.

HP released this application as free and open-source software (FOSS). You won’t get official support, but informal support is open on their launchpad website just in case if you happened to have any questions.

You may also like

27 comments

Gordon Powell January 13, 2018 - 2:56 PM

Excellent! This page let me, a novice, install my printer and update the software with no issues.

Reply
Salim Abdul Fattah August 26, 2018 - 7:02 AM

Brilliant Kiran! Thanks a ton! You solved my issue and let reinstall hplip with no problems. Really thankful!

Reply
malay September 28, 2018 - 6:14 AM

Good work ! Keep it up …

Reply
Peter Kendall October 8, 2018 - 8:44 AM

Kiran,
Sadly Elementary OS is not a supported distro for auto install. And if you try to use the Ubuntu options it fails to find several required packages that my system says are installed and up to date. It appears to be a brick wall.

Reply
Walter October 21, 2018 - 6:31 PM

Same for me 🙁 elementary is not supported.
INSTALL MISSING REQUIRED DEPENDENCIES
————————————-
note: Installation of dependencies requires an active internet connection.
warning: Missing REQUIRED dependency: python-devel (Python devel – Python development files)
warning: This installer cannot install ‘python-devel’ for your distro/OS and/or version.
error: Installation cannot continue without this dependency. Please manually install this dependency and re-run this installer.

to much for me 🙁

Reply
Chiranjeeb January 26, 2019 - 11:21 PM

Hello Kiran, I checked at the official website and could not find my printer which is HP Laserjet p1108 mentioned among the 2594 printers. Will downloading the hplip help?

Reply
Matthew February 5, 2019 - 4:43 AM

Hi! Can I print on ubuntu using HP Ink Tank 115 as my printer? Thank you!

Reply
tazmo8448 March 21, 2019 - 6:10 PM

all good til the end then the program install gives an error message of ‘cups not installed’ you need to install cups to continue…….grrrr

Reply
Wim August 27, 2019 - 1:14 PM

on my device it ends with this message in terminal:
error: hp-systray cannot be run as root. Exiting.

Is this alarming?

It also repeats this mesage as a pop-up everytime I start my computer. I’m running Pop_OS.

Reply
Wamborf August 27, 2019 - 1:17 PM

on my device it ends with this message in terminal:
error: hp-systray cannot be run as root. Exiting.

Is this alarming?

It also repeats this mesage as a pop-up everytime I start my computer. I’m running Pop_OS.

My printer is also twice in my printer devices settings:
1. Photosmart_B110
2. Photosmart_B110_series_3E1670_

Is this normal too?

Reply
Technical Cathy October 9, 2019 - 8:51 AM

Hello admin! May I know the exact steps of how to to solve hp printer not printing black issue as I have Hp Printer and I am unable to solve hp printer offline issue . Can someone help me to with this?

Reply
Taufiq December 28, 2019 - 8:38 PM

Thanks Kiran. Now I can run my printer. Good tutorial!

Reply
Kurt January 27, 2020 - 3:08 AM

Thanks Kiran — Worked perfectly on near 20 y/o HP Deskjet 930C, O.S Linux Mint 19.3 on MSI B450 MB

Reply
Manoharan April 18, 2020 - 11:43 PM

Thanks and lot of Appreciation for such a good service

Reply
JP May 10, 2020 - 11:33 AM

Newb here.
Unable to use the scanner software. Mint 19.3, HP M29 print/scanner. Get this message in terminal:

70CDA59047B9
Creating directory plugin_tmp
Verifying archive integrity… All good.
Uncompressing HPLIP 3.20.3 Plugin Self Extracting Archive……………………………………………………..

HP Linux Imaging and Printing System (ver. 3.20.3)
Plugin Installer ver. 3.0
Plug-in version: 3.20.3
Installed HPLIP version: 3.20.3
Number of files to install: 64

Plugin installation failed
error: Python gobject/dbus may be not installed
error: Plug-in install failed.

Done.

Any ideas?
Thanks!

Reply
William August 8, 2020 - 4:27 PM

sh hplip-3.16.11.run

can’t open not able to get past this

Reply
bukhari August 14, 2020 - 5:53 AM

Dear All
I am using Ubuntu 18.04.4 LTS and want to configure HP LaserJet 1022 printer via network, but i face many issues:
1) I downloaded hplip 3.20.6 driver and wanted to download the corresponding 3.20.6 plugin from the hp website,,,, but i am not able to download the plugin file.. the link just opens and some program coding appears. NO file is downloaded.
2) This makes my configuration via network as shown in the step 16 above impossible.
Can anyone give me any inputs? I would greatly appreciate your help..

Reply
David October 20, 2020 - 5:07 PM

Thanks a million! Managed to get my printer working due to this article. It was really helpful!

Reply
venkat November 22, 2020 - 1:08 AM

thank you you made it very easy.

Reply
LC Boerner February 4, 2021 - 11:13 AM

elementary user, new and noob one!
Everything installed succesfully but the hplip toolbox did not! What did I do wrong?
Thanks for further help!

Reply
CLB February 13, 2021 - 7:39 AM

I’m trying to install on an iMac running Elementary OS 5.1.7. Running “sudo apt install hplip hplip-gui” tells me that hplip and hplip-gui is already the newest version (3.17.10) and won’t update to the newest version (which my printer requires). I also can’t remove the existing driver with dpkg because of dependency problems. So I’m stuck. Anyone have any suggestions? Thanks!!!!

Reply
Vishal February 22, 2021 - 8:16 AM

Its a wonderful guide, very concise. Thanks for it.
Though I am struck at Step 16, Printer is connect to USB and OS is detecting it, however its not being detected by HP tool.
Any clue here 😛

Reply
Ricardo March 3, 2021 - 7:50 AM

Hi, it’s not working in my Linux Mint 20.1 .
Installer log saved in: hplip-install_Wed-03-Mar-2021_12:42:08.log
This is what is happening:

Traceback (most recent call last):
File “./install.py”, line 241, in
text_install.start(language, auto, test_depends, test_unknown, assume_network, max_retries, enable, disable)
File “/home/ricardo/Downloads/hplip-3.16.7/installer/text_install.py”, line 60, in start
core = CoreInstall(MODE_INSTALLER, INTERACTIVE_MODE)
File “/home/ricardo/Downloads/hplip-3.16.7/installer/core_install.py”, line 225, in __init__
self.passwordObj = password.Password(ui_mode)
File “/home/ricardo/Downloads/hplip-3.16.7/base/password.py”, line 110, in __init__
self.__readAuthType() #self.__authType
File “/home/ricardo/Downloads/hplip-3.16.7/base/password.py”, line 133, in __readAuthType
distro_name = get_distro_name().lower()
File “/home/ricardo/Downloads/hplip-3.16.7/base/password.py”, line 79, in get_distro_name
os_name = platform.dist()[0]
AttributeError: module ‘platform’ has no attribute ‘dist’
ricardo@ricardo-ThinkPad-E520:~/Downloads$

Thank you.

Reply
George Pon April 29, 2021 - 2:04 PM

mint 20.1
scanner not working can’t put in the plug in
Help!

Reply
transitioned June 2, 2021 - 1:28 PM

same story on Mint 20.1.
Printer HP Deskjet 2543 working perfectly at first attempt on a Fedora 33 box without doing anything.
On Mint 20.1 (same PC, booting from other disk) after downloading and installing hplip from version 3.13 to 3.21.4 without success, I will try to see whether a generic driver allows me to print. No idea, if successful will post back.

Reply
Haris November 1, 2021 - 7:48 PM

On LinuxMint Release 19 Tara I did “upgrade” and my HP P1006 printer won’t print. It shows “job completed” message but the really does not print anything. I checked USB cables. Boot in “Windows” mode and print works. Re-boot same PC with Mint Linux and does not print. Your instructions really helped. Turned out that after Mint “upgrade” printer “plug-in” is required. After downloading and installing “plug-in” (run plugin shell script) printer started working. Thank you.

Reply
Mathew November 5, 2021 - 1:11 PM

I completed the hplip software installation in Linux Lite version 5.6, confirming Ubuntu as the OS under Distro/OS confirmation option during the installation process.
Everything goes fine, and the setup completes successfully. Even the Device Discovery step proceeds without errors, and shows my HP Deskjet Ink Advantage printer 4675 in the list of discovered devices.
However, clicking next after selecting the listed printer ends with the message stating that the system is unable to communicate with the printer.
The printer is connected to the Desktop through USB cable. Although the same is experienced if the connection is attempted with the printer on WiFi.
I am very sure that there is nothing wrong with printer as it functions normally under Windows 11.
Any help to resolve the issue under Linux Lite 5.6 is greatly appreciated.
Thank you.

Reply

Leave a Reply to Taufiq Cancel Reply

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.