hplip drivers and plugin installation on Ubuntu 24.04
Setting up your headless Ubuntu 24.04 machine to work efficiently with HP printers and scanners requires installing the HPLIP (HP Linux Imaging and Printing) package. This guide will take you through the necessary steps to successfully install HPLIP and address potential plugin installation hurdles.
Step 1: Install HPLIP Drivers
- Download the HPLIP Installer: Begin by downloading the latest HPLIP installer from its official source. Ensure you download the correct version compatible with your system architecture.
wget https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
- Make the Installer Executable: After downloading the installer, you'll need to modify its permissions to ensure it can be executed.
chmod +x hplip-3.25.6.run
- Run the Installer: Execute the HPLIP installer. This process will prompt you for input to configure the HPLIP suite correctly.
./hplip-3.25.6.run
Follow the on-screen instructions carefully. The installer should guide you through the process smoothly.
Step 2: Install the HPLIP Plugin
After installing the HPLIP drivers, you need to address the installation of the HPLIP plugin, especially if you plan to use scanning functionalities.
- Typical Plugin Installation Issues:
Using the
hp-plugin -icommand is often recommended to install the plugin. However, on Ubuntu 24.04, you might encounter the following errors:
error: Unable to receive key from keyserver
hp-plugin[145292]: debug: gpg: keyserver receive failed: No keyserver available
These errors suggest a problem with fetching the necessary keys from the server.
-
Manual Plugin Installation Workaround:
-
Fetch the Key Manually: To solve this, manually fetch the required key using the GPG command from a different server than the default
pgp.mit.eduserver:gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9 -
Download the Plugin: Visit the HPLIP developer page or use the following URL to download the plugin file. Make sure to adjust for the latest version if necessary:
https://developers.hp.com/hp-linux-imaging-and-printing/pluginsDownload
hplip-3.25.6-plugin.runor the latest available version. -
Transfer the Plugin to Your Server: Use a secure transfer method like SCP to move the plugin file to your Ubuntu server if not already there.
scp /path/to/hplip-3.25.6-plugin.run username@yourserver:/path/on/server -
Use X11 Forwarding if you are running headless: To install the plugin manually, you may need to enable X11 forwarding since the program tries to start a GUI. Log into your server with:
ssh -X username@yourserver -
Make the Plugin Executable and Run it:
chmod +x hplip-3.25.6-plugin.run ./hplip-3.25.6-plugin.run