Installing HPLIP for an HP LaserJet on Ubuntu 24.04 should be simple, because Ubuntu already includes HPLIP in its repositories. Yet many users download the installer from HP, run it, and watch it fail with dependency errors, Python warnings, or a message that the distribution is not supported. The printer then sits unused even though a working solution was available all along.
This guide explains why the HP installer fails on Ubuntu 24.04, how to install HPLIP the reliable way from Ubuntu’s own packages, how to add the HP plugin your LaserJet may need, and what to do if you truly must use the upstream installer.
Quick Answer
Do not run HP’s downloaded .run installer on Ubuntu 24.04. Install HPLIP from Ubuntu’s repositories instead with sudo apt update && sudo apt install hplip hplip-gui, then add your LaserJet with sudo hp-setup and install the required plugin with sudo hp-plugin. The repository version is built for Ubuntu 24.04, so it avoids the dependency and Python version failures that break the generic installer.
Why the HPLIP Installer Fails on Ubuntu 24.04
HP publishes a single automatic installer meant to cover many distributions and releases. Ubuntu 24.04 moved forward in ways that trip that generic script. The system Python is newer than the installer expects, some library package names changed, and the installer may not recognise the release at all, stopping with an unsupported distribution or missing dependency message even when the missing item is actually present under a new name.
Dependency loops are another common failure. The installer asks apt to install packages, one of them conflicts with a 24.04 default, the step fails, and the whole installation rolls back or half-completes. Users then retry and get different errors each time, because the system is now in a mixed state with parts of two HPLIP versions present.
There is also a permissions and environment trap. Running the installer with the wrong options, from a directory it cannot write to, or through a graphical sudo prompt that never appears can end the process silently. The core lesson is simple: the failure is usually the installer’s age, not your printer and not your competence. Ubuntu’s packaged HPLIP exists precisely to avoid all of this, because Canonical builds and tests it against the exact libraries in 24.04.
The Reliable Method: Install HPLIP from Ubuntu Repositories
Follow these steps on a clean system, or on a system where a failed installer attempt has been cleaned up as described in the next section.
- Update package information with
sudo apt updateso apt knows the newest available versions. - Install HPLIP and its graphical tools with
sudo apt install hplip hplip-gui printer-driver-hpcups. This provides the drivers, the HP Device Manager, and the command-line setup tools. - Confirm the installation with
dpkg -l | grep hplipandhp-info --versionorhp-check. The check tool lists dependencies and reports whether each one is satisfied. - Add your user to the scanner and printer groups if needed with
sudo usermod -aG lpadmin,scanner $USER, then log out and back in so the new groups apply. - Connect the LaserJet by USB or make sure it is on the same network, switch it on, and let it finish warming up before setup.
- Run the HP setup tool with
sudo hp-setupfor USB or network discovery, orsudo hp-setup PRINTER_IPif you already know the printer’s network address. - Accept the recommended driver hp-setup selects for your exact LaserJet model, give the queue a clear name, and print the test page when prompted.
For most LaserJet models this is the whole job. The printer will appear in Ubuntu Settings, applications will print to it, and future HPLIP updates will arrive normally through Software Updater instead of requiring another manual installer run.
Details about supported models and minimum HPLIP versions are maintained on the HP supported devices list for Linux printing, where you can confirm your exact LaserJet and whether it needs the proprietary plugin before you begin.
Install the HP Plugin Your LaserJet May Need
Some HP LaserJet models require a small proprietary plugin for printing, scanning, or both. Without it, the printer installs successfully but jobs fail or stall, which makes the plugin step easy to overlook and important not to skip.
- Run
sudo hp-pluginin a terminal and follow the prompts to download and install the plugin that matches your installed HPLIP version. - Accept the licence agreement when shown. The plugin is free, but HP distributes it separately for licensing reasons, which is why Ubuntu cannot include it in the main package.
- If the automatic download fails, choose the manual option in the tool, download the plugin file offered for your HPLIP version, and point the installer at that file.
- Verify with
hp-checkagain and look for plugin status in the output. Then print a fresh test page withhp-testpage. - Remember to repeat this step after major HPLIP version upgrades, because the plugin must match the HPLIP version and an upgrade can leave the old plugin behind.
You can also complete this from the HP Device Manager graphical interface, installed as part of hplip-gui, which provides setup, plugin handling, ink or toner information where supported, and diagnostic tools in one place. The official notes at the HP HPLIP download and installation page describe both routes and confirm that distribution packages are the preferred method for supported Ubuntu releases.
Cleaning Up After a Failed Installer Attempt
If HP’s downloaded installer already ran and failed on your machine, clean up before using the repository method, otherwise leftover files can conflict with the packaged version.
- Remove any partially installed upstream files by following the uninstall script if the installer created one, commonly found in the extracted HPLIP folder as an uninstall option.
- Check for mixed packages with
dpkg -l | grep -i hplipand note anything unusual before changing it. - Fix broken package states with
sudo apt --fix-broken installand let apt resolve half-configured packages. - Remove old printer queues in Settings that point to the failed installation, because they keep the broken driver selection. You will recreate the queue cleanly with hp-setup.
- Reboot once, then follow the repository installation steps from the beginning.
If you genuinely need a newer HPLIP than Ubuntu 24.04 ships, for example for a LaserJet released after 24.04, prefer waiting for Ubuntu updates or using the printer in driverless IPP mode as an interim solution, which most modern network LaserJets support well. Only return to the upstream installer as a last resort, on a backed-up system, reading every prompt and choosing the interactive mode so you can see exactly which dependency fails. When jobs later stall even on a correct install, our troubleshooting guide for an HP printer that is detected in Ubuntu but will not print covers the queue and filter checks to run next.
Verifying the Printer Works Properly
Finish with real verification, not just a successful installer message. Print the test page, then print a normal document from an application you actually use. Check both sides if your LaserJet supports duplex, and confirm the correct paper size is selected, because a Letter and A4 mix-up causes scaling surprises that look like driver faults. Run lpstat -p to confirm the queue is idle and enabled, and keep hp-check output in mind as your baseline for future troubleshooting.
Common Mistakes and Useful Tips
- Downloading the .run file first: On Ubuntu, the repository package should always be your first choice. The generic installer is the fallback, not the standard route.
- Running the installer with sudo directly: HP’s script expects to manage privileges itself and often fails when launched fully as root. This is another reason to avoid it on 24.04.
- Skipping the plugin: A LaserJet that installs but will not print frequently just needs
sudo hp-plugin. Run it before deeper troubleshooting. - Choosing a similar model driver: Always use the exact model hp-setup recommends. Close matches cause failed and stalled jobs.
- Mixing two HPLIP versions: Never combine the upstream installer with repository packages. Pick one source and clean up fully before switching.
- Forgetting group membership: If setup tools cannot see or manage the printer, check
lpadmingroup membership and log in again after adding it.
Conclusion
When the HPLIP installer fails on Ubuntu 24.04, the answer is rarely to fight the installer harder. Ubuntu’s own HPLIP packages are built for this release and install cleanly with apt. Add the printer with hp-setup, install the plugin with hp-plugin, verify with a real test page, and your LaserJet will print reliably and update safely with the rest of your system.
Frequently Asked Questions
Is HPLIP already installed on Ubuntu 24.04?
Ubuntu includes HPLIP in its repositories and often installs parts of it by default. Check with dpkg -l | grep hplip. If it is missing, install it with sudo apt install hplip hplip-gui.
Why does HP’s installer say my distribution is not supported?
The generic installer lags behind new Ubuntu releases and may not recognise 24.04 or its newer libraries. That message reflects the installer’s age, not a problem with your printer. Use the repository packages instead.
Does my HP LaserJet need the proprietary plugin?
Many LaserJet models do, especially for full printing support. Run hp-check to see the requirement for your model and sudo hp-plugin to install it. Without a required plugin, jobs typically fail or stall.
Can I use my LaserJet without HPLIP at all?
Often yes, if it is a network model that supports driverless IPP printing. Ubuntu can add it automatically with good basic features. HPLIP remains the better choice for USB models, exact drivers, and HP’s management tools.
What should I do if hp-setup cannot find my printer?
Confirm the printer is on, warmed up, and on the same network, then run sudo hp-setup PRINTER_IP with its current address. For USB, try another port and cable and confirm detection with lsusb.


Leave a Reply