This simple tutorial shows how to install the latest HPLIP package in a newer Ubuntu system that the official installer does not support.
HPLIP is an open-source Linux drivers with thousands of HP’s inkjet and laser printers support. HP offers help and support for HPLIP. And, an automated installer is available to make the installation easy.
Since HPLIP is updating regularly, the package in Ubuntu system repositories is always old! So, the best way to get the latest features and new devices support is using the official installer. However, the official installer usually lacks the latest Linux distributions support!
At the moment of writing this tutorial, the new HPLIP 3.23.5 supports Ubuntu up to v22.10. If you’re going to install it in Ubuntu 23.04 or other unsupported Ubuntu releases, then this tutorial could help!
Step 1: Download the HPLIP installer
The latest version of the “.run” installer package is available to download at sourceforge.net via the link below (usually ‘hplip-x.xx.x.run‘):
Once downloaded, open terminal from start menu (or ‘Activities’ overview):
When terminal, run command to navigate to the Downloads folder:
Next add executable permission and run the installer to start installing HPLIP:
chmod u+x hplip-*.run && ./hplip-*.run
Follow the terminal screen output, answer questions, and it should fail if your system is not supported.
Step 2: Manually install HPLIP dependencies and compile it:
The commands you run in the previous command will fail on unsupported systems. However, it created a source folder that’s useful for compiling it. If the folder somehow does not exist, use
cd ~/Downloads && ./hplip-*.run --target ~/Downloads/hplip command to generate it.
Open your ‘Downloads’ folder and right-click on that folder, then use “Open in Terminal” option to open that folder as working directory in terminal.
1.) Then, in the pop-up terminal window, firstly run command to install the build dependencies:
sudo apt install --assume-yes libcups2-dev libdbus-1-dev build-essential ghostscript openssl libjpeg-dev libsnmp-dev libtool-bin libusb-1.0-0-dev wget python3-pil policykit-1-gnome python3-pyqt5 python3-dbus.mainloop.pyqt5 python-gi-dev python3-dev python3-notify2 python3 python3-reportlab libsane-dev xsane libavahi-client-dev libavahi-core-dev avahi-utils
2.) Finally, you can configure the source by running command:
./configure --prefix=/usr --enable-qt5 --disable-qt4
and compile it via:
finally install HPLIP:
sudo make install
Also open that source folder in terminal (right-clicking on folder and select ‘Open in Terminal’), you can run the uninstall script to remove HPLIP. It works for the driver installed either via the auto installer or manually compiled from source.
That’s all. Enjoy!