Install HP Printer drivers in Ubuntu, Linux Mint, 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.

Leave a comment

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