Broken libsane-dev dependancy

Asked by Ian M. Stewart

Hi there,

I've just installed a new HP CN503B Photosmart Premium e-All-In-One C310a, and hit a problem with the HPLIP installation. During the driver install, there was a failure of sudo apt-get install libsane-dev. After installation, the printer works OK, but I can't access the scanner.

In a terminal, ~$ hp-check -t reveals the following:

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

"Basic system information:
Linux shelob 2.6.32-33-generic #71-Ubuntu SMP Wed Jul 20 17:27:30 UTC 2011 x86_64 GNU/Linux

"Distribution:
ubuntu 10.04

"Checking Python version...
OK, version 2.6.5 installed

"Checking PyQt 4.x version...
OK, version 4.7.2 installed.

"Checking for CUPS...
Status: scheduler is running
Version: 1.4.3
error_log is set to level: warn

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

And:

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

"Checking for dependency: SANE - Scanning library development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --assume-yes libsane-dev

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

"Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.
"

If I try to load it from a terminal, the same thing happens, and in Ubuntu Software Centre, I get the following report:

"This error could be caused by requiring additional software packages which are missing or not installable. Alternatively, there could be a conflict between software packages which are not allowed to be installed at the same time.
"

I'm considering uninstalling the HPLIP driver, trying then to put in the libsane-dev, and then reinstalling HPLIP.

I have tried synaptic and got the following results:

" Could not mark all packages for installation or upgrade.

"The following packages have unresolved dependancies.
Make sure that all required repositories are added and
enabled in the preferences:

"libsane-dev:
  Depends: libsane (=1.0.20-13ubuntu2) but 1.0.21-0ubuntu1
is to be installed
"

For some reason, "force package" is greyed out, and I can't seem to find any way past this. How can I revert to the the, presumably earlier, 1.0.20-13ubuntu2? Is that really what's needed?

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
goutam kodu
Solved:
Last query:
Last reply:
Revision history for this message
Srikanth (srikanth-lokare) said :
#1

Hi,

Please download the latest HPLIP (3.11.7) release from http://hplipopensource.com/hplip-web/gethplip.html
Install the latest HPLIP. Installation instructions are also available in the same page at http://hplipopensource.com/hplip-web/install/install/index.html. Please post the complete output of "hp-check -t" after installation.

Thanks and Regards,
Srikanth Lokare

Revision history for this message
Ian M. Stewart (ims) said :
#2

Thanks for the reply Srikanth,

I have downloaded and run the 3.11.7 release and during the install the terminal shows me this:
DEPENDENCY AND CONFLICT RESOLUTION
----------------------------------
Running 'sudo apt-get install --assume-yes libsane-dev'
Please wait, this may take several minutes...
error: Command failed. Re-try #1...
Running 'sudo apt-get install --assume-yes libsane-dev'
Please wait, this may take several minutes...
error: Command failed. Re-try #2...
Running 'sudo apt-get install --assume-yes libsane-dev'
Please wait, this may take several minutes...
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes libsane-dev'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Would you like to retry installing the missing package(s) (y=yes*, n=no, q=quit) ?

After two attempts, I used q to quit, as I know that the same problem will still be there. My previous non-working installation was 3.11.5, with the very same problem.

Regards,
Ian

Revision history for this message
Ian M. Stewart (ims) said :
#3

Here is the output of hp-check -t:

hplip$ hp-check -t

HP Linux Imaging and Printing System (ver. 3.11.7)
Dependency/Version Check Utility ver. 14.3

Copyright (c) 2001-9 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 shelob 2.6.32-33-generic #71-Ubuntu SMP Wed Jul 20 17:27:30 UTC 2011 x86_64 GNU/Linux

Distribution:
ubuntu 10.04

Checking Python version...
OK, version 2.6.5 installed

Checking PyQt 4.x version...
OK, version 4.7.2 installed.

Checking for CUPS...
Status: scheduler is running
Version: 1.4.3
error_log is set to level: warn

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

------------------------------------
| 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 devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: CUPS image - CUPS image 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: PolicyKit - Administrative policy framework...
OK, found.

Checking for dependency: PyQt 4 DBus - DBus Support for PyQt4...
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 libnotify - Python bindings for the libnotify Desktop notifications...
OK, found.

Checking for dependency: Python XML libraries...
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...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo apt-get install --assume-yes libsane-dev

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

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

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

Currently installed HPLIP version...
HPLIP 3.11.7 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=3.11.7

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

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=no
gui-build=yes
scanner-build=no
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.11.7
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=no
hpijs-only-build=no
lite-build=no
udev-acl-rules=yes
hpcups-only-build=no
hpijs-only-build=no

Current contents of '/var/lib/hp/hplip.state' file:
# hplip.state - HPLIP runtime persistent variables.

[plugin]
installed=0
eula=0

Current contents of '~/.hplip/hplip.conf' file:
[last_used]
printer_name =
working_dir = .
device_uri = "hp:/net/Photosmart_Prem_C310_series?zc=HPCEA98E"

[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[installation]
version = 3.11.7
date_time = 02/08/11 10:32:35

[settings]
systray_messages = 0
systray_visible = 0

[fax]
email_address =
voice_phone =

[refresh]
rate = 30
enable = false
type = 1

[polling]
enable = false
device_list =
interval = 5

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

Photosmart_Prem_C310
--------------------
Type: Printer
Device URI: hp:/net/Photosmart_Prem_C310_series?zc=HPCEA98E
PPD: /etc/cups/ppd/Photosmart_Prem_C310.ppd
PPD Description: HP Photosmart Prem c310 Series, hpcups 3.11.5
Printer status: printer Photosmart_Prem_C310 is idle. enabled since Mon 25 Jul 2011 22:54:52 BST

HP Linux Imaging and Printing System (ver. 3.11.7)
System Tray Status Service ver. 2.0

Copyright (c) 2001-9 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.

/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
  set_interactive(1)
Communication status: Good

Photosmart_Prem_C310_2
----------------------
Type: Printer
Device URI: hp:/net/Photosmart_Prem_C310_series?zc=HPCEA98E
PPD: /etc/cups/ppd/Photosmart_Prem_C310_2.ppd
PPD Description: HP Photosmart Prem c310 Series, hpcups 3.11.7
Printer status: printer Photosmart_Prem_C310_2 is idle. enabled since Tue 02 Aug 2011 10:31:54 BST
Communication status: Good

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

---------------
| USER GROUPS |
---------------

ian adm lp dialout cdrom floppy plugdev lpadmin admin sambashare

-----------
| SUMMARY |
-----------

error: 1 error or warning.

Summary of needed commands to run to satisfy missing dependencies:
sudo apt-get install --assume-yes libsane-dev

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

Done.

Again, when I try to install libsane-dev I get this response:

hplip$ sudo apt-get install --assume-yes libsane-dev
[sudo] password for ian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
  libsane-dev: Depends: libsane (= 1.0.20-13ubuntu2) but 1.0.21-0ubuntu1 is to be installed
E: Broken packages

And in synaptic package manager, if I try to install libsane-dev I get the following report:

libsane-dev:
  Depends: libsane (=1.0.20-13ubuntu2) but 1.0.21-0ubuntu1 is to be installed

Hope that helps,
Ian

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Ian M. Stewart (ims) said :
#5

I have still made no progress with this problem. My requests for help on the Ubuntu forum have gone unanswered. I have to assume that no-one else has encountered this difficulty, and no-one can suggest how I should get around it.

It looks to me that I must install libsane 1.0.20-13ubuntu2 in place of libsane 1.0.21-0ubuntu1. Can anyone tell me how to do that please?

Revision history for this message
goutam kodu (goutam-hplip) said :
#6

Hi,

Hplip depends on libsane and libsane-dev packages for the scanner to function . Can you run the below command to check the status of these packages in your system.

$dpkg-query -s "libsane"
$dpkg-query -s "libsane-dev"

$dpkg-query -W "libsane"
$dpkg-query -W "libsane-dev"

Thanks & Regards,
Goutam Kodu

Revision history for this message
Ian M. Stewart (ims) said :
#7

Thanks for the response Goutam.

$dpkg-query -s "libsane" gives:

Package: libsane
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 10856
Maintainer: Ubuntu Core Developers <email address hidden>
Architecture: amd64
Source: sane-backends
Version: 1.0.21-0ubuntu1

followed by lots of further detail.

$ dpkg-query -s "libsane-dev"
Package `libsane-dev' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

$ dpkg-query -W "libsane"
libsane 1.0.21-0ubuntu1

$ dpkg-query -W "libsane-dev"
No packages found matching libsane-dev.

So it appears that I do not have libsane-dev at all, but cannot install it because my libsane version is the wrong one. I need to over-ride the 1.0.21-0ubuntu1 with the 1.0.20-13ubuntu2 version. That's the bit I can't seem to find a way to do.

Ian

Revision history for this message
Best goutam kodu (goutam-hplip) said :
#8

Hi,

Try command "sudo apt-get remove libsane" to remove libsane 1.0.21-0ubuntu1. If this did not work then try running command "dpkg - -remove libsane 1.0.21-0ubuntu1"

After removing the package libsane 1.0.21-0ubuntu1.

Run command " sudo apt-get install libsane libsane-dev"

This will install libsane_1.0.20-13ubuntu2_amd64.deb & libsane-dev_1.0.20-13ubuntu2_amd64.deb packages from http://archive.ubuntu.com/ubuntu/pool/main/s/sane-backends/ repo.

Let us know on the same.

Thanks & Regards,
Goutam Kodu

Revision history for this message
Ian M. Stewart (ims) said :
#9

Many many thanks Goutam,

That was so simple! Unexpectedly (to me, at least) Xsane was uninstalled as well along with libsane, but the re-installation of hplip-3.11.7 included re-installation of Xsane so all is now well.

I now have full control of the HP CN503B Photosmart Premium e-All-In-One C310a printer and scanner, which I can recommend to any Linux user as a complete solution where several different operating systems are in use on a network. I will post some reviews after a couple of months experience with this.

Best regards, and thank you for your help.

Ian

Revision history for this message
Ian M. Stewart (ims) said :
#10

Thanks goutamkk, that solved my question.