hplip still uses the discontinued pyQt4 in Debian when running the newest installer (3.25.6 as of writing this). Similarly, the versions supplied in Debian 12 and 13 still require pyQt4, but pyQt4 has been removed from the official Debian repositories. To get around this, how do I build hplip from source with pyQt5 support in Debian 12 or 13?
1 Answer
First, install hplip from the official Debian apt repo using sudo apt install hplip-gui or sudo apt install hplip. This step is vital.
Download the latest tar.gz (hplip-3.25.6 as of writing this) from https://sourceforge.net/projects/hplip/
Extract it with tar xzf hplip-3.25.6.tar.gz.
cd hplip-3.25.6
./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-qt5 --disable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build
make
make install
Then run hp-check and make sure you have the right dependencies. You may need to install python-is-python3 to get it to run.
- 
        What’s the reason for--libdir=/usr/lib64?Stephen Kitt– Stephen Kitt2025-08-18 06:38:19 +00:00Commented Aug 18 at 6:38
- 
        Copied from developers.hp.com/hp-linux-imaging-and-printing/install/manual/…. It appears to specify a 64 bit build.Drake Sobania– Drake Sobania2025-08-18 22:46:02 +00:00Commented Aug 18 at 22:46
- 
        It specifies the target directory for libraries, and is wrong for Debian 12 — but you’re following instructions for Debian 6, so that’s hardly surprising.Stephen Kitt– Stephen Kitt2025-08-23 16:05:53 +00:00Commented Aug 23 at 16:05
hp-checkafter the installation.hp-check -rgets it wrong, but the packages are built withpyqt5— you can see that in/etc/hp/hplip.conf. Debian packages can’t depend on packages that no longer exist in the distribution.hplipfrom source is useful anyway because the version packaged in Debian is rather old and missing support for quite a few printers.