Install latest hplip version on Debian 9

I bought a new HP Deskjet 2621 and I tried to install it using the hp-setup which didn’t recognize it.

The problem is the hplip version (generaly 3.16.11+repack0-3 in jessie and 3.16.11+repack0-1~bpo8+1 in jessie-backports), if you have a too recent printer (like me), ppd files are not available in version 3.16.11+repack0-3.

I tried to install latest one binary (at that moment).

1
sh hplip-3.17.11.run

After the whole process a had a dependencies problems because packages:

  • pyqt4
  • pyqt4-dbus

had different names in 9.3:

  • python-qt4
  • python-qt4-dbus

So to fix it you have two options once downloaded the source code from above link.

  1. Following the instructions from the following link (#3 message).
  2. Compile and install it your self.

I chose the 2nd option:

1
~/src/hplip-3.17.11 $ ./configure

Here I found another dependencies issue:

1
"configure: error: cannot find net-snmp support (or --disable-network-build)"

Disabling the networking build is bad idea if you have a wireless printer, it won’t work. Then your have to install the net-snmp packages and the development packages for openssl.

Once installed above dependencies, I just executed bellow commands to install the hp-setup binary with my printer drivers.

1
2
3
4
~/src/hplip-3.17.11 $ make clean
~/src/hplip-3.17.11 $ ./configure
~/src/hplip-3.17.11 $ make
~/src/hplip-3.17.11 $ su -c "make install"

And then execute hp-setup ans install your printer:

Hp-setup example