hplip-3.16.11 installation give me a message that debian 8.7 is not supported

Asked by mohammad

i have installed a debian 8.7 in my PC, but when i am trying to install hplip-3.16.11 it give a message that debian 8.7 is not supported

Question information

Language:
Lithuanian Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Nicolas Baranger
Solved:
Last query:
Last reply:
Revision history for this message
Nicolas Baranger (nbanba) said :
#1

Hi
maybe i van help you.
this morning i had the same problem after apt get upgrade.
So i "hack" hplip installer To make hplip work on deb 8.7 and To solve dependency problems with pyqt4.
I recommand you to install kernel 4.9 from jessie-backports before installing hplip.
 If you are interrest on how To hack your hplip installer to make hplip work on deb 8.7 ask me and Wen i go back home I will post you all change i made To hplip installer.
Regards
Nicolas

Revision history for this message
mohammad (altookhy) said :
#2

thank you for reply
ok can you post what you did?
because i installed this verson hplip-3.16.11 anyway then installed hplip using "apt-get install hplip" then installed hpijs-ppds then installed the plugin "hp-plugin" and now it is working good

Revision history for this message
Best Nicolas Baranger (nbanba) said :
#3

Hi,

The problem with apt is that hplip version is not 3.16.11 (generaly 3.14.9 in jessie and 3.16.9 in jessie-backports), and if you have a too recent printer (like me), ppd files are not available in version less than 3.16.11

So, I will post what I did :

So first run extract hplip-3.16.11 in /usr/src/hplip-3.16.11

get error :

DEPENDENCY AND CONFLICT RESOLUTION
----------------------------------
error: A required dependency 'pyqt4-dbus (PyQt 4 DBus - DBus Support for PyQt4)' is still missing.
error: A required dependency 'pyqt4 (PyQt 4- Qt interface for Python (for Qt version 4.x))' is still missing.

error: Installation cannot continue without these dependencies.
error: Please manually install this dependency and re-run this installer.

and error :
error: debian-8.7 version is not supported, so all dependencies may not be installed. However trying to install using debian-8.6 version packages.

So, I had to solve dependencies problems because packages:
pyqt4
pyqt4-dbus
had different names in 8.7:
python-qt4
python-qt4-dbus

So in file hplip-3.16.11/installer/core_install.py , lines 378 & 379, I change :

I change :
   'pyqt4-dbus' : (True, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP),
by
      'python-qt4-dbus' : (True, ['gui_qt4'], QT4DBUS_STR, self.check_pyqt4_dbus, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP),
and
           'pyqt4': (True, ['gui_qt4'], QT4_STR, self.check_pyqt4, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), # PyQt 4.x )
 by
        'python-qt4': (True, ['gui_qt4'], QT4_STR, self.check_pyqt4, DEPENDENCY_RUN_TIME,'4.0','FUNC#get_pyQt4_version', GENERALDEP), # PyQt 4.x )

After doing this, I add version 8.7 to hplip installer :
in file :
hplip-3.16.11/installer/distros.dat

I change line 4112 by adding 8.7 to the list of debian versions :

versions=7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6
by
versions=7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6,8.7

And after doing this, I had the configuration of the new version to the same file, starting at line 5028 until line 5146 :

 [debian:8.7]
 code_name=Jessie
 supported=1
 scan_supported=1
 fax_supported=1
 pcard_supported=1
 network_supported=1
 parallel_supported=1
 usb_supported=1
 packaged_version=3.16.11
 release_date=22/12/2016
 notes=NOTE: Disable the CD Sources in your apt sources.list or the install will fail and hang.
 ppd_install=drv
 udev_mode_fix=1
 ppd_dir=/usr/share/ppd/HP
 fix_ppd_symlink=0
 drv_dir=/usr/share/cups/drv/HP
 ui_toolkit=qt5
 native_cups=1
 policykit=0
 # This libdir_path will be used only for 64 bit machine.
 libdir_path=/usr/lib/x86_64-linux-gnu
 [debian:8.7:cups]
 packages=cups,libcups2
 [debian:8.7:cups-devel]
 packages=libcups2-dev,cups-bsd,cups-client
 [debian:8.7:gcc]
 packages=g++
 [debian:8.7:gs]
 packages=ghostscript,ghostscript-cups,ghostscript-x
 [debian:8.7:libcrypto]
 packages=libssl-dev
 [debian:8.7:libjpeg]
 packages=libjpeg62-turbo-dev
 [debian:8.7:libnetsnmp-devel]
 packages=libsnmp-dev,snmp
 [debian:8.7:libpthread]
 packages=libc6
 [debian:8.7:libtool]
 packages=libtool,libtool-bin
 [debian:8.7:libusb]
 packages=libusb-1.0.0-dev
 [debian:8.7:make]
 packages=make
 [debian:8.7:pil]
 packages=python-imaging
 [debian:8.7:ppdev]
 packages=
 commands=su -c "modprobe ppdev",su -c cp -f /etc/modules /etc/modules.hplip,echo ppdev | su -c tee -a /etc/modules
 [debian:8.7:pyqt]
 packages=python-qt3
 [debian:8.7:python-devel]
 packages=python-dev
 [debian:8.7:pyqt4]
 packages=python-qt4
 [debian:8.7:pyqt4-dbus]
 packages=python-qt4-dbus
 [debian:8.7:python23]
 packages=python
 [debian:8.7:python2X]
 packages=python
 [debian:8.7:reportlab]
 packages=python-reportlab
 [debian:8.7:sane]
 packages=sane
 [debian:8.7:sane-devel]
 packages=libsane-dev
 [debian:8.7:scanimage]
 packages=sane-utils
 [debian:8.7:xsane]
 packages=xsane
 [debian:8.7:cups-ddk]
 packages=
 [debian:8.7:python-dbus]
 packages=python-dbus,python-gobject
 [debian:8.7:dbus]
 packages=libdbus-1-dev
 [debian:8.7:python-ctypes]
 packages=python-ctypes
 [debian:8.7:cups-image]
 packages=libcupsimage2,libcupsimage2-dev
 [debian:8.7:policykit]
 packages=policykit-1,policykit-1-gnome
 [debian:8.7:python-notify]
 packages=python-notify
 [debian:8.7:network]
 packages=wget
 [debian:8.7:avahi-utils]
 packages=avahi-utils
 [debian:8.7:gtk]
 packages=libcanberra-gtk-module
 [debian:8.7:python3-notify2]
 packages=python3-notify2
 [debian:8.7:python3-pyqt4-dbus]
 [debian:8.7:python3-pyqt4]
 packages=python3-pyqt4,gtk2-engines-pixbuf
 [debian:8.7:python3-dbus]
 packages=python3-dbus,python3-gi
 [debian:8.7:python3-xml]
 packages=python3-lxml
 [debian:8.7:python3-devel]
 packages=python3-dev
 [debian:8.7:python3-pil]
 packages=python3-pil
 [debian:8.7:python3-reportlab]
 packages=python3-reportlab
 [debian:8.7:python3-pyqt5-dbus]
 [debian:8.7:python3-pyqt5]
 packages=python3-pyqt5,gtk2-engines-pixbuf
 [debian:8.7:pyqt5]
 packages=gtk2-engines-pixbuf,python-pyqt5
 [debian:8.7:pyqt5-dbus]

So after adding those lines, debian 8.7 is recognized as a supported version for hplip-3.16.11
I run the hplip-install script in hplip-3.16.11/ and successfully install hplip-3.16.11 on debian 8.7.

When running, I had the message :

DISTRO/OS CONFIRMATION
----------------------
Distro appears to be Debian 8.7.
Is "Debian 8.7" your correct distro/OS and version (y=yes*, n=no, q=quit) ?

and no dependencies errors :
CHECKING DEPENDENCIES
------------------------
OK

After the install everythings work fine:

My printer had been detected and sucessfully add
The fax was configured sucessfully too
and features like scan, double side printing, hplip-toolbox (hp-systray) etc... are also working fine

Hope it could help you and other people.
Enjoy,

Regards,
Nicolas

Revision history for this message
mohammad (altookhy) said :
#4

Thank you Nicolas, it is working

Revision history for this message
mohammad (altookhy) said :
#5

Thanks Nicolas Baranger, that solved my question.

Revision history for this message
Nicolas Baranger (nbanba) said :
#6

Pleasure !
Hope it could help other people too...

I will try to make a .deb package for debian 8.7 including those changes to the installer to make install easier for non sysadmin people

Revision history for this message
Vladislav Kalugin (minhinprom) said :
#7

Nicolas Baranger (nbanba), thank you very much!
I installed this driver on debian 10.1!

Revision history for this message
Nicolas Baranger (nbanba) said :
#8

HI,

Happy it was helpfull for you and it can be used with Debian Buster , 2 major upgrades after the post of this walkthrough...

For my part, now on Debian 10, I'm using hplip directly from apt :
(I don't need a special version if the version is higher than hplip-3.16.11 , I bought my printer in 2017 ...)

But don't worry, I'm still loving compiling the program source myself !

Here is what I'm currently using with debian Buster :

09:07:41 nba@14RV-SERVER-163:~$ uname -a
Linux 14RV-SERVER-163 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux

09:07:43 nba@14RV-SERVER-163:~$ cat /etc/*ease
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

09:07:48 nba@14RV-SERVER-163:~$ dpkg -l |grep hplip
ii hplip 3.18.12+dfsg0-2 amd64 HP Linux Printing and Imaging System (HPLIP)
ii hplip-data 3.18.12+dfsg0-2 all HP Linux Printing and Imaging - data files
rc hplip-gui 3.16.11+repack0-3 all HP Linux Printing and Imaging - GUI utilities (Qt-based)

09:07:48 nba@14RV-SERVER-163:~$

Kind reagrds,
nbanba

Revision history for this message
Nicolas Baranger (nbanba) said (last edit ):
#9

Hi everyone

I've just bought a new printer HP 9012e and I get the same trouble this morning with HPLIP 3.22.10 on :
- Debian 10.13 (the maximum value is 10.9 in installer/distro.dat)
- Debian 11.6 (the maximum value is 11 in distro.dat)

So I replay the describes hack and it work !

For Debian 10.13, I did use a shorter hack :

modifying installer/distros.dat :

line 8906 adding debian 10.13

versions=6.0,6.0.1,6.0.2,6.0.3,6.0.4,6.0.5,6.0.6,6.0.7,6.0.8,6.0.9,6.0.10,7.0,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6,8.7,8.8,9.1,9.2,9.3,9.4,9.5,9.6,9.7,9.8,9.9,10.0,10.1,10.2,10.3,10.4,10.6,10.7,10.8,10.9,10.13,11

and line 11613 I add :

# ****************************************

[debian:10.13]
same_as_version=10.9

# ****************************************

This hack work fine for debian 10.13 but not for debian 11.6 where I also have troubles with python-qt* so I replay the first hack I post on this forum for debian 8.7

I did those 2 hacks only for the FUN this morning, beacuse now it's possible do download hplip-3.22.10.tar.gz which contains the sources code to build on the machine of your choice.

I have already test to build hplip-3.22.10 from hplip-3.22.10.tar.gz and I did success on debian 10.* and on debian 11.* with some simple and standard actions like :
./configure
make
sudo make install

Tested on ~ 10 different machine from debian 10.5 to debian 11.6 (latest stable on 2023-03-23)

Regards
nbanba

PS: Now I'm able to scan recto/verso automagically (and to copy too) with the last version of HPLIP !