Installation How-Tos

Installation

How to Check if HPLIP is Installed On Your System
How to Install HPLIP Using the Automatic Installer
How to unblock ports and enable services in the firewall
How to Manually Install the HPLIP Source Code Tarball
How to Install an HPLIP Patch
How to Uninstall HPLIP
How do I open a Terminal/Console to Install HPLIP or Run an HPLIP Command Line Program?
How to Disable Software Install Mode on Photosmart A530 and A630
How to install hplip with qt5
Install HPLIP on Red Hat 9
What is the HPLIP Binary Plug-In and How Do I Install It?
Installation instruction for scanjet feature dependency packages in RHEL6 and RHEL7
How to install HPLIP on RHEL8?

 

 

How to Check if HPLIP is Installed On Your System

 

 

Required Steps: 

Is HPLIP currently installed?

Most current Linux distributions provide a version of HPLIP software during initial installation.  However, it is quite possible, that you are not operating on the latest version available from our site.  This may be important because a newer version will support the latest printer models, may contain a newly added feature, or may contain a bug/defect fix that may be important to you.

First, check to see if HPLIP is already installed by running one of the commands listed below; however, your distribution may have specific package manager commands that are not described here. Therefore, while these commands should work in most situations, you may want to refer to your distribution documentation for the correct way to configure and use HPLIP.

Debian package based distributions (Debian, Ubuntu, Mepis, etc):

Run in a terminal window:

dpkg -l hplip

You may see something that looks like this:

Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name     Version         Description
-----------------------------------------------------------------------------
ii hplip     1.7.3-0ubuntu1   HP Linux Printing and Imaging

If you see "ii" in the first column before "hplip", then HPLIP is already installed. If you want to use the currently installed version of HPLIP, try running hp-setup in a terminal shell. See below to determine whether you need to install a newer version.

RPM package based distributions (Fedora, SUSE, Mandriva, RHEL, etc):

Run in a terminal window:

rpm -qa hplip

You may see something that looks like this:

hplip-1.6.7-4

Output that lists "hplip" and a version number indicates that HPLIP is already installed on your system.

If HPLIP is already installed try running hp-setup to configure your printer.

Check for the latest version of HPLIP installed on your system.

Do you have a newer printer that is not supported by your older version of HPLIP?

Check the Supported Devices page to see what version of HPLIP is required for your printer.

Do you want new features or need a version that has a specific bug fixed?

Even though your printer is supported by an older version of HPLIP you may want the newest updated features that the latest version of HPLIP has to offer. Check the Release Notes page for new features and specific bug fixes.

If you have a newer printer or need a feature / bug fix contained in a newer HPLIP version...

Determine if a newer pre-packaged version of HPLIP is available by using your distribution tools (Synaptic, Yum, Apt-get, YasT, Red Carpet, etc) to check. It is preferrable to use a pre-packaged version of HPLIP as it is easier to install and upgrade.

If a newer version is not available from your distribution or the version they offer doesn't have the printer support you need, continue with the download and installation of HPLIP.

How to Install HPLIP Using the Automatic Installer

Required Steps:

Many Linux distributions are equipped with a pre-packaged version of HPLIP software, therefore, you may already have HPLIP installed on your system.

Even though HPLIP is already installed on your system, you may wish to upgrade to a newer version. Additionally, you may wish to have the latest version if you have a newer printer, a need for a new feature, or would like a bug fix that is contained in the newest version. If so, click HERE to find out how to auto-install HPLIP.

A few items to note about what the Automatic Installation process provides:

  • Automatic compilation and installation of the HPLIP package (to the /usr/share directory)

  • Installation of all options

  • Removal of previous installations of HPLIP and HPOJ packages

  • Assumes that all optional dependencies will be downloaded and installed

  • Provides installation of required dependencies

  • Asks to confirm Linux distribution

  • Automatically runs the hp-setup tool to finish installation and configure your printer

If you wish to uninstall HPLIP manually (for advanced users) click HERE.

How to unblock ports and enable services in the firewall

Notes: 

1 Firewall Settings

HPLIP uses service discovery protocols like avahi, SLP to discover network resources like printers in a Local Area Network (LAN). These services listen at well defined port numbers. Therefore, to allow resource discovery it is required that certain ports should not be blocked by a firewall, if any, running on the host machine. By default in OpenSuse/RHEL etc., all the ports are blocked due to security considerations. In this particular scenario HPLIP cannot discover the printers on LAN using network discovery methods (slp, avahi, mDNS/bonjour). To allow network discovery methods to discover printers in LAN, follow the steps mentioned below.

OpenSUSE

Avahi

  1. Go to the Yast Control Center and click on Firewall.

  2. Select Allowed Services on left hand side pane.

  3. Click the Service to Allow drop down, which will show a list of services we can enable using this firewall utility.

  4. To allow avahi to discover the devices through hp-setup utility, select Zeroconf/Bonjour Multicast DNS and select Add from drop down and click on Next at the bottom right corner.

  5. The OpenSuse Firewall Utility will display Firewall Configuration Summary. Click on Finish to complete the process.

mDNS/Bonjour

  1. Go to the Yast Control Center and click on Firewall

  2. Select Custom Rules on the left pane, select Zone as External and then select Add at the bottom. A pop up will appear.  Provide the values of the parameter as : Source Network  0/0, Protocol UDP, Ports 5353

  3. Click on Add at the bottom right.

  4. The OpenSuSe firewall utility will display Firewall Configuration Summary. Click Finish to complete the process.

SLP

  1. Go to the Yast Control Center and click on Firewall.

  2. Select Custom Rules on the left pane, select Zone as External and then select Add at the bottom. A pop up will appear. Provide the values of the parameter as: Source Network  0/0, Protocol UDP, Ports 427

  3. Click on Add at the bottom right.

  4. The OpenSuSe firewall utility will display Firewall Configuration Summary. Click Finish to complete the process.

For advanced usage of the SuSeFirewall2 utility and more details about the above options check the following link https://en.opensuse.org/SuSEfirewall2

RHEL

mDNS/Bonjour 

  1. Go to Firewall Configuration on the RHEL system.
  2. Switch to Public→→Ports tab.
  3. Click Add.
  4. Input 5353 in the Port/Range text box.
  5. Select protocol type as udp.
  6. Save the changes.

How to Manually Install the HPLIP Source Code Tarball

Required Steps: 

Even though we recommend using the Automatic Installation process to install HPLIP, the manual installation is a more traditional method to download and install HPLIP. However, bear in mind that it is more technically involved and may require a degree of knowledge that new Linux users find more difficult than they would prefer. Specifically, the process requires that you manually install dependencies and run build and install commands in a console/terminal. If you decide you would like to pursue this method, then follow the directions on our Manual Installation Instructions page.

How to install an HPLIP Patch

Required Steps:

Patches may only be applied to the tarball version of the HPLIP software (not an RPM, DEB, TGZ, or other pre-build package).

How to apply a patch:

$ cd hplip-<version>
$ patch -p1 < hplip-<version>.patch
$ ./configure --prefix=/usr
$ make clean
$ make
$ su   (or use 'sudo make install')
# make install   (as root)

How to Uninstall HPLIP

Required Steps: 

A. If you still have the source Tarball, go into the source directory--for example:

cd ~/Desktop/hplip-3.10.2

B. Execute this command to remove/uninstall HPLIP:

su -c "make uninstall"

or if your distro uses sudo:

sudo make uninstall

C. Enter the following command to remove the HPLIP installed directory:

*Warning*

If you do not enter this command correctly you could damage your system.

su -c "rm -rf /usr/share/hplip"
su -c "rm -rf /etc/hp"

su -c "rm -rf ~/.hplip"
su -c "rm -rf /var/lib/hp"

or if your distro uses sudo;

sudo rm -rf /usr/share/hplip
sudo rm -rf /etc/hp

sudo rm -rf ~/.hplip

sudo rm -rf /var/lib/hp

D. The uninstall/removal of HPLIP software is now complete. Perhaps you would now like to re-install?

How do I open a Terminal/Console to Install HPLIP or Run an HPLIP Command Line Program?

Notes: 
Fedora Users: Refer to this article or use system menus: Applications | System | Terminal

Ubuntu Users: Type ALT-F2 and then enter "gnome-terminal" or  use system menus: Applications | Accessories | Terminal

Kubuntu Users: Type ALT-F2 and then enter "konsole" or use system menus: "K" Menu | Applications | System | Konsole

SUSE Users: Use system menus: Computer Menu | More Applications | System | Terminal

MEPIS Users: Type ALT-F2 and then enter "konsole" or use system menus: "K" Menu | System | Terminal Program (Konsole)

Mandriva Users: Use system menus: Applications | Tools | Terminal

All others: Using the desktop system menu (generally in the upper left or lower left corner of the display), search for a program named "Terminal", "Console", "Konsole", etc. and run it.

How to Disable Software Install Mode on Photosmart A530 and A630

Notes: 

On these two products, there is an embedded UI option that makes the unit enumerate like a CDROM in a Windows environment. In order for these units to install properly, in a Linux environment, this option must be deactivated.

To deactivate this option on the A530 follow these steps:

  1. Plug the power supply into the back of the A530 but do not connect the USB.
  2. Hit the "menu" button on the front of the unit.
  3. Hit the "left" button twice and select the "tools" menu by pressing the "print/ok" button.
  4. Hit the "left" button 4 times and select the "software install mode" menu.
  5. Make sure the "off" option is highlighted in orange with an orange "check" mark next to the word "off".

To deactivate this option on the A630 follow these steps:

  1. Plug the power supply in without plugging in the USB.
  2. Hit the "setup" button (it looks like a wrench) in the top right corner of the touch screen.
  3. Click on the "preferences" button.
  4. Scroll down until you see the "software install mode" button. Make sure the orange "check" mark is next to the word "off".

How to install HPLIP with qt5

Notes:
HPLIP supports Qt5 from 3.16.5 and above

To enable qt5 support:

  1. You need to install the following dependencies
    • PyQt5
    • python-qt5-dbus
  2. Go to source of hplip. By default it is in ~/Downloads.
  3. Run the following commands
    • ./configure --prefix=/usr --enable-qt5 --disable-qt4
    • make
    • "make install" as root user

Install HPLIP on Red Hat 9

Required Steps: 

If all HPLIP features aren't working properly on Red Hat 9, however, printing is behaving properly, then follow these directions for installing HPLIP:

I. Install Red Hat Development Packages:
*******************************************
1.  Click on Red Hat (Icon)
2.  Click on System Settings
3.  Click on Add/Remove Applications
4.  Put check mark next to "Development" then "Update".

II. Install Required Dependencies
*********************************
1.  Put Red Hat CD 2 Into CD-rom drive.
2.  Run:

su -c "rpm -vi /mnt/cdrom/RedHat/RPMS/libjpeg-devel-6b-26.i386.rpm"
su -c "rpm -vi /mnt/cdrom/RedHat/RPMS/cups-devel-1.1.17-13.i386.rpm"
su -c "rpm -vi /mnt/cdrom/RedHat/RPMS/sane-backends-devel-1.0.9-5.i386.rpm"

(if the above commands don't work you may need to change the CD-rom mount path)

III. Install CUPS 1.2 from source
*****************************
1.  Download a copy of the cups software from their website.
2.  Run the following commands from a terminal window:

tar xvfz cups-1.2.12-source.tar.gz
cd cups-1.2.12
./configure --prefix=/usr
make
su -c "make install"

IV. Install HPLIP
****************
1.  Download the latest tarball here.
2.  Run the following commands from a terminal window:

tar xvfz hplip-3.9.4.tar.gz
cd hplip-3.9.4
./configure --disable-network-build --disable-pp-build --disable-fax-build --enable-gui-build --enable-scan-build --enable-doc-build --enable-foomatic-ppd-install --disable-foomatic-drv-install --with-hpppddir=/usr/share/ppd/HP --disable-hpijs-only-build --prefix=/usr
make
su -c "make install"

V. Edit cupsd.conf
*****************
1.  Run the following command from a terminal window:

su -c "/etc/cups/cupsd.conf"
2.  Change the following lines near the bottom:
AuthType Basic
and
AuthClass System
to:
#AuthType Basic
and
#AuthClass System

VI. Restart CUPS
****************
1.  Run the following commands from a terminal window:

su -c "/etc/init.d/cups restart"

VII. Add the printer
******************
1.  Go to the localhost site.
2.  Click "Add this printer" on the printer that has HPLIP as a suffix at the end of the printer name.
(The next step is important)
3.  At the model/driver page select "browse" go to "//usr/share/ppd/HP" directory, be sure to select the correct PPD for the printer, it should contain the printer model that you are trying to add.
4.  Click "Add Printer"
5.  Go to the application you would like to print from and the printer should print.

What is the HPLIP Binary Plug-In and How Do I Install It?

Answer: 

Binary Plug-in Information

Some HP printers require proprietary software technologies to allow full access to printer features and performance.  Unfortunately, these technologies cannot be open sourced, but to resolve this HP uses a binary plug-in for these printers.  This plug-in works in conjunction with our Linux Open Source Printing Software to improve the printing experience for HP Linux Printing Customers. Additionally, it requires the user to read and agree to a license agreement at the time of driver installation.  However, to limit confusion, there is a single plug-in file (for each HPLIP release) for all plug-in enabled devices.

As of February 2009 (concurrent with the 3.9.2 release of HPLIP), there were approximately 50 LaserJet printers or MFP's [EDITOR SUGGESTS UPDATE] that either require the plug-in for the device to operate or use the plug-in for enhanced performance (i.e. improved print quality, faster print speed, etc.).  However, additional devices (including inkjet products) are anticipated to use the plug-in in the future.  For the current list of plug-in enabled printers see this link, which also includes the device features that are enabled or enhanced by the plug-in.

Most Linux distributions include HPLIP with their software, but most do not include the plug-in.  Therefore, it is a safe practice to run a utility called "hp-setup", which, will install the printer into the CUPS spooler, download, and install the plug-in at the appropriate time. 

To install the plug-in using the GUI you can follow these procedures:

1.  Launch a command-line window and enter:

hp-setup

2.  Select your connection type and click "Next".

3.  Select your printer from "Selected Devices" list and click "Next".

4.  Enter your root password when prompted and click "Next".

5.  Use the recommended installation method and click "Next".

6.  Check the box to accept with the "Driver Plug-In License Agreement" and click "Next".

7.  Finish the installation of the printer as normal, however you may be prompted to re-enter your user name and password.

If you run into any additional install problems, you can go to our known issues page and check for a solution.

For advanced users who wish to install HPLIP components manually, a utility exists (hp-plugin) which will download and install the plugin file, but it does not also install a printer queue like hp-setup does.

Do the following:

1.  Launch a command-line window and enter:

hp-plugin

2. Follow the directions above for navigating the GUI but remember that the printer que will not be installed through this process.

 *Note: you may need to run hp-plugin as root or super user depending on your distro.

Installation instruction for scanjet feature dependecny packages in RHEL6 and RHEL7

Please install the below listed packages for Scanjet features testing in RHEL 6:

  • su -c "yum install python-devel libjpeg-devel zlib-devel"
  • su -c "yum install gcc"
  • su -c "rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm"
  • su -c "yum install python-pip"
  • su -c “pip install pillow==2.6”
  • su -c "yum install tesseract-devel leptonica-devel"
  • su -c “yum install tesseract-langpack-*”
  • su -c "yum install gcc-c++"
  • su -c "pip install tesserocr==2.0"
  • su -c "pip install PyPDF2"
  • su -c "pip install imutils"
  • su -c "yum install zbar-devel"
  • su -c "pip install zbar"
  • su -c “yum install ImageMagick*”
  • su -c “yum install tesseract-osd”
  • su -c “pip install pypdfocr”

      Manual Installation steps to install opencv-python version 2.4:

  • su -c "yum install cmake"
  • su -c "yum install python-devel numpy"
  • su -c "yum install gtk2-devel"
  • su -c "yum install libdc1394-devel"
  • su -c "yum install libv4l-devel"
  • su -c "yum install gstreamer-plugins-base-devel"
  • wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.13/opencv-2.4.13.zip
  • unzip opencv-2.4.13.zip
  • cd opencv-2.4.13
  • mkdir release
  • cd release
  • cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
  • make
  • su -c "make install"
  • export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.6/site-packages
  • su -c "mv /usr/local/lib/python2.6/site-packages/cv2.so /usr/lib/python2.6/site-packages"

Please install the below listed packages for Scanjet features testing in RHEL 7:

  • su -c "yum install gcc"
  • su -c "yum install gcc-c++"
  • wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  • rpm -ivh epel-release-latest-7.noarch.rpm
  • su -c "rpm -ivh epel-release-latest-7.noarch.rpm"
  • su -c "yum install python-pip"
  • su -c "yum install python-devel"
  • su -c "yum install zbar-devel"
  • su -c "pip install opencv-python"
  • su -c "pip install PyPDF2"
  • su -c "pip install tesseract"
  • su -c "yum install tesseract-devel leptonica-devel"
  • su -c "yum install tesseract-langpack-*”
  • su -c "yum install Cython"
  • su -c "pip install --upgrade Cython"
  • su -c "pip install imutils"
  • su -c "pip install tesserocr"
  • su -c "pip install pillow"
  • su -c "pip install –upgrade pillow"
  • su -c "pip install zbar"
  • su -c “yum install tesseract-osd”
  • su -c “yum install ImageMagick*”
  • su -c “pip install scikit-image”
  • su -c “pip install pypdfocr”

How to install HPLIP on RHEL8

Please follow the below steps to install HPLIP on RHEL8:

1. Download RHEL 8 rpm package.

2. Execute the below steps to install the rpm package.

  • Use su –c "rpm –ev --nodeps ” command to remove any other conflicting packages as below.
  • su -c "rpm -ev --nodeps hpijs"
  • su -c "rpm -ev --nodeps libsane-hpaio"
  • su -c "rpm -ev --nodeps hplip-common"
  • su -c "rpm -ev --nodeps hplip-libs”
  • su -c "rpm -ivh hplipfull-3.19.8_rhel-8.0.x86_64.rpm --nodeps"

3. Please execute the below steps to install print related packages.

  • alternatives --set python /usr/bin/python3
  • su -c "yum clean all"
  • su -c "yum check-update"
  • su -c "yum install python3-devel"
  • su -c "yum install python3-qt5"
  • su -c "yum install cups-devel"
  • su -c "yum install python3-reportlab"
  • su -c "yum install libtool”
  • su -c "yum install make”
  • su -c "yum install xsane”
  • su -c "yum install net-snmp-devel”
  • su -c "yum install sane-backends-devel”
  • su -c "yum install dbus-devel”

4. Please execute the below steps to install ScanJet related packages.

  • su -c "pip3 install opencv-python”
  • su -c "pip3 install PyPDF2”
  • su -c "pip3 install ocrmypdf”
  • su -c "pip3 install scikit-image”

5. run the hp-setup command to add device for print/scan.

6. Install the plugin file if the device needs plugin for print/scan.

7. For class driver installation execute the below command:

  • su -c "rpm -ivh --force hplipclassdriver-3.19.8-0.RHEL8_x86_64.rpm --nodeps”