cannot install hplip

Asked by Carpintonto

Debian 4 Linux debian 2.6.18-6-486 #1 Mon May 4 23:59:22 UTC 2009 i586 GNU/Linux

HP deskjet 5650

john@debian:~/hp/hplip-3.9.6b$ hp-check -t
bash: hp-check: command not found

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

tail of hplip-install_Wed-15-Jul-2009_16:49:20.log

: (Reading database ...
: 53315 files and directories currently installed.)
Preparing to replace reportbug 3.31 (using .../reportbug_3.31+etch1_all.deb) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...

: 'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing /var/cache/apt/archives/reportbug_3.31+etch1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1

: Errors were encountered while processing:
 /var/cache/apt/archives/reportbug_3.31+etch1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

error: Package install command failed with error code 100
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
aptitude report:

(Reading database ... 53315 files and directories currently installed.)
Preparing to replace reportbug 3.31 (using .../reportbug_3.31+etch1_all.deb) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing /var/cache/apt/archives/reportbug_3.31+etch1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/reportbug_3.31+etch1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up python-sip4 (4.4.5-4) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing python-sip4 (--configure):
 subprocess post-installation script returned error exit status 1
Setting up python-xml (0.8.4-6) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing python-xml (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: error processing reportbug (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
dpkg: dependency problems prevent configuration of python-qt3:
 python-qt3 depends on python-sip4 (>= 4.4.3-1.1); however:
  Package python-sip4 is not configured yet.
dpkg: error processing python-qt3 (--configure):
 dependency problems - leaving unconfigured
Setting up python-imaging (1.1.5-11) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing python-imaging (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of hplip:
 hplip depends on python-qt3; however:
  Package python-qt3 is not configured yet.
dpkg: error processing hplip (--configure):
 dependency problems - leaving unconfigured
Setting up python2.4-minimal (2.4.4-3+etch2) ...
Linking and byte-compiling packages for runtime python2.4...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing python2.4-minimal (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-reportlab:
 python-reportlab depends on python-xml (>= 0.8.4-5); however:
  Package python-xml is not configured yet.
dpkg: error processing python-reportlab (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python2.4:
 python2.4 depends on python2.4-minimal (= 2.4.4-3+etch2); however:
  Package python2.4-minimal is not configured yet.
dpkg: error processing python2.4 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-sip4
 python-xml
 reportbug
 python-qt3
 python-imaging
 hplip
 python2.4-minimal
 python-reportlab
 python2.4
Press return to continue.

and repeat as necessary ...

I am having the sense I need to uninstall some stuff and start over, but I am not sure what.

Also, this is a headless server. Failing to add the dj 5650 via the cups web interface, I tried via Webmin and that worked in terms of it appearing on cup list of printers. Still no printing happens.

Also I am uncertain as to whether I can or cannot use the parallel port with this distro and printer.

thank you, thank you very much

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Carpintonto
Solved:
Last query:
Last reply:
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#1

This looks like a problem with dpkg. The HPLIP installer uses dpkg to install the packages for debian and from the errors:

: (Reading database ...
: 53315 files and directories currently installed.)
Preparing to replace reportbug 3.31 (using .../reportbug_3.31+etch1_all.deb) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...

: 'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error processing /var/cache/apt/archives/reportbug_3.31+etch1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in ?
    import fnmatch, glob, os, re, sys, time
ImportError: No module named fnmatch
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1

It looks like there is a system problem or problem with dpkg.

Hope this points you in the right direction.

Aaron

Revision history for this message
Carpintonto (jbdough) said :
#2

dpkg seems to be working correctly but I am not sure.

I have obtained dpkg_1.13.26_i386.deb in case I need it.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
from
http://www.debianhelp.co.uk/pkgadm.htm

if the dpkg command is broken follow this

A broken dpkg may make it impossible to install any .deb files. A procedure like the following will help you recover from this situation. (In the first line, you can replace "links" with your favorite browser command.)

     $ links http://http.us.debian.org/debian/pool/main/d/dpkg/
       ... download the good dpkg_version_arch.deb
     $ su
     password: *****
     # ar x dpkg_version_arch.deb
     # mv data.tar.gz /data.tar.gz
     # cd /
     # tar xzfv data.tar.gz

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I attempted to remove some of the packages who's failed installations seemed to indicate corrupted dependencies with apt-get.

apt-get suggested I try apt-get -f install

which output the following

debian:/home/john/hp# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
  foomatic-filters-ppds gcc-4.3-base libtimedate-perl
Suggested packages:
  foomatic-db-hpijs foomatic-db-gutenprint foo2zjs
Recommended packages:
  cups
The following packages will be REMOVED:
  apt apt-utils aptitude build-essential cpp cpp-4.1 cupsys cupsys-driver-gutenprint dselect g++
  g++-4.1 gcc gcc-4.1 groff-base gs-common gs-esp hpijs hpijs-ppds libc6-dev libgc1c2 libgcc1
  libmudflap0 libmudflap0-dev libncurses5-dev libpoppler0c2 libreadline5-dev libsigc++-2.0-0c2a
  libssp0 libstdc++6 libstdc++6-4.1-dev man-db policycoreutils poppler-utils python
  python-central python-imaging python-newt python-selinux python-semanage python-sip4
  python-support python-xml reportbug selinux-policy-refpolicy-targeted tasksel tasksel-data
  telnet w3m zlib1g-dev
The following NEW packages will be installed:
  gcc-4.3-base libtimedate-perl
The following packages will be upgraded:
  foomatic-filters-ppds
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt libgcc1 (due to apt) libstdc++6 (due to apt)
1 upgraded, 2 newly installed, 49 to remove and 235 not upgraded.
6 not fully installed or removed.
Need to get 0B/3519kB of archives.
After unpacking 134MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?]
Abort.

If I were to tell it to execute,
could re-install apt, apt-utils, and aptitude (in that order) with dpkg, and then be on my merry way, or is there a bit more to it?

Revision history for this message
Carpintonto (jbdough) said :
#3

I ran apt-get -f install,
deleted all conflicted entries from /var/lib/dpkg/status
re-installed apt, apt-utils, and aptitude

and then dist-upgraded to Debian 5.

hplip-3.9.6b.run got a lot farther then, but still reported that I'd have to install ghostscript manually.

It was installed already, so I just installed the hplip ver. 2.8.6b Debian package.

Now I get two different outputs from hp-check depending on how
/etc/udev/rules.d/24-hpmud.rules
is configured.

with the line: SUBSYSTEM=="ppdev", OWNER="lp", GROUP="lp"

debian:/home/john/hp# hp-check -t

HP Linux Imaging and Printing System (ver. 2.8.6b)
Dependency/Version Check Utility ver. 14.0

Copyright (c) 2001-8 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux debian 2.6.26-2-486 #1 Sun Jun 21 04:15:19 UTC 2009 i586 GNU/Linux

Distribution:
debian 5.0

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.2 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
error: SIP not installed or version not found.

Checking for CUPS...
Status: scheduler is running
Version: 1.3.8
error_log is set to level: warn
note: For troubleshooting printing issues, it is best to have the CUPS 'LogLevel'
note: set to 'debug'. To set the LogLevel to debug, edit the file /etc/cups/cupsd.conf (as root),
note: and change the line near the top of the file that begins with 'LogLevel' to read:
note: LogLevel debug
note: Save the file and then restart CUPS (see your OS/distro docs on how to restart CUPS).
note: Now, when you print, helpful debug information will be saved to the file:
note: /var/log/cups/error_log
note: You can monitor this file by running this command in a console/shell:
note: tail -f /var/log/cups/error_log

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.82.4

------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
OK, found.

Checking for dependency: cups-devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: dbus - Message bus system...
OK, found.

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency: libjpeg - JPEG library...
OK, found.

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
OK, found.

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
OK, found.

Checking for dependency: libusb - USB library...
OK, found.

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-ctypes - A foreign function library for Python...
OK, found.

Checking for dependency: python-dbus - Python bindings for dbus...
OK, found.

Checking for dependency: python-devel - Python development files...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
su -c "apt-get install --force-yes -y sane"

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.8.6b currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=2.8.6b

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hpijs/HP
ppdbase=/usr/share/ppd/hpijs
doc=/usr/share/doc/hplip-doc/HTML
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
internal-tag=2.8.6.20b

-------------------------------
| DISCOVERED PARALLEL DEVICES |
-------------------------------

here it hangs.

With
/etc/udev/rules.d/24-hpmud.rules
line
SUBSYSTEM=="ppdev", OWNER="lp", GROUP="scanner"

it reports no parallel devices detected.

I think that indicates I solved a permissions issue but my BIOS may not be able to
configure the parallel port for ECP mode.

I just realized I've been running the headless server without a video card, so I'd have to rebuild it to accept a monitor to see the BIOS ...

no love from dmidecode -

# dmidecode 2.9
# No SMBIOS nor DMI entry point found, sorry.

Revision history for this message
Carpintonto (jbdough) said :
#4

I forget everything I did now, but I am printing from the parallel port.

hp-check -t didn't think sane dependencies were satisfied but apt-get said they were.
(I'm not trying to use a scanner anyway, this is a deskjet)

hp-setup does work without a gui.

one final note on case closed:

Do make sure the case is fully closed, that is the lid on the printer itself is shut all the way - heh