How To Install HPLIP on Linux Mint 22
Installing HPLIP (HP Linux Imaging and Printing) on Linux Mint 22 can seem daunting for newcomers to Linux. However, with the right approach and detailed instructions, you can get your HP printer and scanner working seamlessly with your Linux Mint system. This comprehensive guide walks you through multiple installation methods, troubleshooting common issues, and optimizing your HP device performance.
HPLIP serves as the essential bridge between your HP hardware and Linux Mint 22. Without proper installation, you might experience printing failures, scanner malfunctions, or complete device incompatibility. This guide ensures you avoid these pitfalls while maximizing your HP device’s functionality.
What is HPLIP and Why You Need It
HP Linux Imaging and Printing (HPLIP) represents HP’s official solution for Linux compatibility with their extensive hardware lineup. This comprehensive software package supports over 3,424 HP printer and scanner models, making it indispensable for HP device owners running Linux systems.
The HPLIP system provides three core functionalities that transform your Linux experience with HP devices. Printing capabilities include full-color printing, duplex printing, and advanced print quality controls. Scanning features offer document scanning, photo scanning, and OCR functionality integration. Faxing support enables direct fax transmission through compatible HP all-in-one devices.
Linux Mint 22, built on Ubuntu’s solid foundation, benefits significantly from HPLIP’s robust driver architecture. The software bridges the gap between Linux’s open-source nature and HP’s proprietary hardware protocols. Without HPLIP, many HP devices remain partially functional or completely unusable on Linux systems.
Key benefits of HPLIP installation include automatic device discovery, seamless network printing, advanced scanner integration, and comprehensive device maintenance tools. The HPLIP Toolbox provides real-time ink level monitoring, print head cleaning utilities, and diagnostic capabilities that rival Windows-based HP software.
Prerequisites and System Requirements
Before beginning the HPLIP installation process, ensure your Linux Mint 22 system meets all necessary requirements. Administrative access through sudo privileges is mandatory for installing system-level drivers and modifying printer configurations.
Your system requires an active internet connection for downloading dependencies and accessing HP’s driver repositories. Network connectivity becomes especially crucial when installing the latest HPLIP versions directly from HP’s servers.
Pre-Installation Checklist
Start by checking if HPLIP already exists on your system. Execute the following command in your terminal:
dpkg -l | grep hplip
This command reveals any existing HPLIP installations and their current versions. Many Linux Mint installations include HPLIP by default, but these versions might be outdated or lack full functionality.
Verify your HP device’s compatibility by visiting HP’s official HPLIP support database. Device compatibility varies significantly between HPLIP versions, with newer devices often requiring the latest software releases.
Check your system’s architecture using:
uname -m
This determines whether you need 32-bit or 64-bit HPLIP packages. Architecture mismatches can cause installation failures or runtime errors.
Required Dependencies Overview
HPLIP depends on numerous system libraries and development tools. Critical packages include CUPS (Common UNIX Printing System), Python development libraries, Qt framework components, and USB communication libraries.
The dependency list includes essential components like libcups2, cups development headers, ghostscript for PostScript processing, and various Python modules. Missing dependencies represent the most common cause of HPLIP installation failures.
Qt framework requirements deserve special attention, as HPLIP’s graphical interface relies heavily on Qt5 libraries. Qt4 compatibility issues frequently arise on newer Linux distributions, requiring specific configuration adjustments.
Method 1: Installing HPLIP from Linux Mint Repository
The repository installation method offers simplicity and automatic dependency resolution. This approach works well for users seeking basic HP device functionality without complex configuration requirements.
Updating System Packages
Begin by refreshing your package repositories and upgrading existing system packages:
sudo apt update
sudo apt upgrade
Package updates ensure compatibility between HPLIP and your current system libraries. Outdated packages often cause mysterious installation failures or runtime crashes.
Allow the update process to complete fully before proceeding. System reboots might be necessary if kernel updates occur during the upgrade process.
Installing HPLIP via APT
Install HPLIP and its graphical interface using the following command:
sudo apt install hplip hplip-gui hplip-tools
The installation process automatically resolves dependencies and configures basic printer support. Additional packages like hplip-tools provide command-line utilities for advanced users.
Monitor the installation output for error messages or warnings. Dependency conflicts occasionally arise when conflicting printer drivers already exist on your system.
Verifying Repository Installation
Test your HPLIP installation using the built-in verification tool:
hp-check
This comprehensive diagnostic tool examines your system configuration, identifies missing dependencies, and reports potential compatibility issues. Green checkmarks indicate successful component installation, while red warnings highlight problems requiring attention.
Launch the device setup wizard to configure your HP printer or scanner:
hp-setup
The setup wizard automatically discovers connected HP devices and guides you through configuration steps. USB devices typically appear immediately, while network devices might require additional discovery time.
Troubleshooting Repository Installation
Repository installations occasionally fail due to missing dependencies or package conflicts. Common issues include outdated package repositories, conflicting printer drivers, or incomplete dependency resolution.
If the installation fails, try updating your package cache and attempting installation again:
sudo apt update
sudo apt autoremove
sudo apt install hplip hplip-gui
Package conflicts with existing printer software can be resolved by removing conflicting packages before installing HPLIP.
Method 2: Manual Installation from HP Official Source
Manual installation from HP’s official sources provides access to the latest HPLIP versions and cutting-edge device support. This method suits users requiring specific features or compatibility with newer HP devices.
Downloading the Official HPLIP Installer
Navigate to HP’s Developer Portal at developers.hp.com to access the latest HPLIP releases. Version 3.25.2 represents the current stable release, offering enhanced Linux Mint 22 compatibility and expanded device support.
Download the self-extracting installer to your home directory or desktop. Consistent download locations simplify the installation process and reduce file management confusion.
Verify the download integrity using checksums provided on HP’s website. File corruption during download can cause installation failures or system instability.
Preparing for Manual Installation
Remove any existing HPLIP installations to prevent conflicts:
sudo apt remove hplip hplip-gui hplip-tools
sudo apt autoremove
Clean removal ensures no conflicting files remain that might interfere with the manual installation process.
Create a dedicated working directory for the installation:
mkdir ~/hplip-install
cd ~/hplip-install
Organized file management reduces confusion during installation and simplifies troubleshooting if issues arise.
Installing Dependencies Manually
Install the comprehensive dependency list required for HPLIP functionality:
sudo apt-get install libcups2 cups libcupsimage2-dev libcups2-dev cups-bsd cups-client libdbus-1-dev build-essential ghostscript openssl libjpeg62-dev libsnmp-dev libtool libusb-1.0.0-dev wget python3-imaging policykit-1 python3-pyqt5 python3-dbus python3-gobject python3-dev python3-reportlab libsane libsane-dev sane-utils xsane
This extensive command installs all necessary libraries, development tools, and Python modules. Complete dependency installation prevents runtime errors and ensures full HPLIP functionality.
Python 3 compatibility requires specific attention, as HPLIP has transitioned from Python 2 to Python 3 support in recent versions.
Running the Official Installer
Make the downloaded installer executable:
chmod +x hplip-3.25.2.run
Execute the installer with root privileges:
sudo ./hplip-3.25.2.run
The interactive installation process guides you through configuration options and dependency verification. Automatic mode typically works well for standard installations, while custom mode allows advanced configuration adjustments.
Installation prompts require careful attention, as incorrect responses can lead to incomplete installations or missing functionality.
Handling Linux Mint 22 Compatibility Issues
HPLIP occasionally reports compatibility warnings with newer Linux distributions. Version detection algorithms sometimes misidentify Linux Mint 22, requiring manual intervention.
If compatibility warnings appear, select “Continue anyway” or choose an alternative distribution profile like “Ubuntu 24.04” which shares Linux Mint 22’s underlying architecture.
Compatibility warnings rarely indicate actual incompatibility issues, as Linux Mint maintains strong Ubuntu compatibility.
Method 3: Compiling from Source (Advanced Users)
Source compilation offers maximum customization and compatibility control for experienced Linux users. This method provides access to cutting-edge features and allows specific configuration optimizations.
When Source Compilation is Necessary
Source compilation becomes necessary when binary installers fail, when specific compilation flags are required, or when contributing to HPLIP development. Advanced users benefit from the flexibility and control offered by source compilation.
Custom optimization flags can improve performance on specific hardware configurations or enable experimental features not available in standard distributions.
Downloading and Extracting Source Code
Download the source tarball from HP’s official repository:
wget https://sourceforge.net/projects/hplip/files/hplip/3.25.2/hplip-3.25.2.tar.gz
Extract the source code:
tar xvfz hplip-3.25.2.tar.gz
cd hplip-3.25.2
Source extraction creates a directory containing all HPLIP source files and build scripts.
Configuring the Build Environment
Configure the build environment with appropriate options:
./configure --with-hpppddir=/usr/share/ppd/HP --prefix=/usr --enable-udev-acl-rules --enable-qt5 --disable-libusb01_build
Configuration flags determine installation directories, feature enablement, and library dependencies. Qt5 enablement ensures graphical interface compatibility with modern Linux systems.
Review the configuration output for warnings or missing dependencies. Configuration errors must be resolved before proceeding to compilation.
Compilation and Installation
Compile the source code:
make -j$(nproc)
The parallel compilation using all available CPU cores significantly reduces build time on modern systems.
Install the compiled software:
sudo make install
Add your user to the necessary groups:
sudo usermod -a -G lp,lpadmin $USER
Group membership ensures proper printer access permissions for your user account.
Post-Installation Configuration and Setup
Successful HPLIP installation requires proper device configuration and user permission setup. Post-installation steps often determine whether your HP devices function correctly.
Initial Device Setup
Connect your HP device using USB, network, or wireless connection. Connection method affects the discovery and configuration process.
Launch the device setup wizard:
hp-setup
The wizard automatically detects connected devices and guides you through driver installation and configuration. Network devices might require additional time for discovery, especially on complex network configurations.
USB device detection typically occurs immediately upon connection, while wireless devices might require manual network configuration.
Configuring Printer Settings
Access the HPLIP Toolbox for comprehensive device management:
hp-toolbox
The graphical interface provides access to printer preferences, maintenance functions, and device status monitoring. Default print settings can be adjusted to match your typical usage patterns.
Network printer configuration requires IP address verification and network connectivity testing. Use the ping command to verify network communication with your printer.
Scanner Configuration
Configure scanner functionality using the integrated setup tools. Scanner detection follows printer configuration and typically requires minimal user intervention.
Test scanner functionality:
hp-scan --output=test-scan.jpg
Scanner testing verifies proper driver installation and device communication. Integration with system applications like Simple Scan or GIMP enhances scanning workflow efficiency.
User Permissions and Group Membership
Add users to appropriate printer groups:
sudo usermod -a -G lp,lpadmin $USER
User group membership ensures proper access to printer and scanner devices. Permission issues represent common causes of device access failures.
Log out and log back in for group changes to take effect. Session restart activates new group memberships and permissions.
Testing Installation Success
Perform comprehensive system verification:
hp-check -v
The verbose output provides detailed information about system configuration, installed components, and potential issues. Successful installation shows green checkmarks for all critical components.
Print a test page to verify printer functionality:
hp-testpage
Test page printing confirms proper driver installation and device communication.
Common Issues and Troubleshooting
HPLIP installation and configuration can encounter various issues requiring systematic troubleshooting approaches. Problem identification and systematic resolution ensure successful device operation.
Linux Mint 22 Specific Compatibility Issues
Version detection problems occasionally occur when HPLIP’s compatibility database doesn’t recognize Linux Mint 22. The installer might display warnings about unsupported distribution versions.
Resolve compatibility warnings by selecting “Continue anyway” or choosing Ubuntu 24.04 as an alternative distribution profile. Underlying compatibility remains intact due to Linux Mint’s Ubuntu foundation.
Dependency mismatches can arise when Linux Mint 22’s package versions differ from HPLIP’s expectations. Manual dependency installation often resolves these conflicts.
Dependency-Related Problems
Missing Qt libraries represent the most common dependency issue. Install Qt5 development packages:
sudo apt install qtbase5-dev qttools5-dev-tools
Python development packages might be missing on minimal system installations:
sudo apt install python3-dev python3-setuptools
CUPS development files are essential for printer driver compilation:
sudo apt install libcups2-dev libcupsimage2-dev
USB Device Detection Issues
USB permission problems prevent device access. Verify your user belongs to the necessary groups:
groups $USER
USB device recognition can be tested using:
lsusb | grep -i hewlett
Device unplugging and reconnection often resolves temporary USB communication issues.
Network Printer Connectivity Problems
Network discovery failures occur when firewall settings block printer communication. Configure firewall exceptions for CUPS and HPLIP:
sudo ufw allow 631/tcp
sudo ufw allow 5353/udp
IP address connectivity testing using ping verifies network communication:
ping [printer-ip-address]
Hostname resolution issues can be bypassed by using IP addresses instead of device names during setup.
Print Quality and Color Issues
Print quality adjustments through the HPLIP Toolbox can resolve common printing problems. Access printer preferences to modify print resolution, color settings, and paper type configurations.
Color profile problems might require manual color management configuration through system settings. Ink level monitoring helps identify cartridge-related print quality issues.
Driver-specific settings offer advanced print customization options for professional printing requirements.
Alternative Solutions and Workarounds
When standard HPLIP installation methods fail, alternative approaches can provide functional printer and scanner support. Fallback solutions ensure device functionality even when optimal configurations aren’t achievable.
Using Generic Linux Drivers
CUPS built-in drivers offer basic printing functionality for many HP devices. Access the CUPS web interface at localhost:631 to configure generic drivers when HPLIP fails completely.
Gutenprint drivers provide enhanced printing capabilities for older HP devices. Install Gutenprint:
sudo apt install printer-driver-gutenprint
Generic PostScript drivers work with HP PostScript-compatible printers, offering reliable printing without proprietary software.
Third-Party Driver Solutions
Community-maintained packages sometimes offer solutions for problematic devices. Search for PPA repositories containing updated HPLIP versions:
sudo add-apt-repository ppa:linuxuprising/apps
sudo apt update
Ubuntu compatibility ensures most Ubuntu-based solutions work on Linux Mint 22. Package version conflicts can be resolved using package pinning or manual dependency management.
Network Printing Alternatives
IPP (Internet Printing Protocol) provides network printing without HPLIP dependencies. Many modern HP printers support IPP natively, allowing direct connection through CUPS.
Print server configurations using dedicated hardware or software solutions can centralize printer management and reduce individual system complexity.
Maintenance and Updates
Regular HPLIP maintenance ensures continued device functionality and optimal performance. Proactive maintenance prevents common issues and extends hardware lifespan.
Keeping HPLIP Updated
Monitor HP’s release announcements for new HPLIP versions. Version updates often include bug fixes, security patches, and expanded device support.
Update frequency varies based on your specific needs and device compatibility requirements. Stable installations might not require frequent updates, while newer devices benefit from regular software updates.
Regular Maintenance Tasks
Execute periodic system checks:
hp-check
Monthly verification helps identify developing issues before they cause device failures.
Log file cleanup prevents storage accumulation and improves system performance:
sudo logrotate /etc/logrotate.d/cups
Monitoring Device Health
HPLIP Toolbox provides real-time device status monitoring and maintenance scheduling. Ink level alerts help prevent print job failures due to empty cartridges.
Preventive maintenance through automated cleaning cycles extends print head lifespan and maintains print quality.
Congratulations! You have successfully installed HPLIP. Thanks for using this tutorial for installing the HPLIP on Linux Mint 22 system. For additional help or useful information, we recommend you check the official HPLIP website.