HP Color Laserjet M280nw:扫描仪无法工作

HP Color Laserjet M280nw:扫描仪无法工作

我尝试让 HP M280nw 扫描仪工作,但没有成功。我尝试过不同的操作系统,但是,运行效果较好的是 19.10。

打印机没有任何问题,但是扫描仪却出问题了。

以下报告是使用默认的 19.10 HP 包执行的;安装新的包不会产生任何有意义的效果(自 3.18.5 起支持扫描)。

该程序simple-scan检测到扫描仪,但在尝试启动扫描时抛出错误。

$ lsb_release --all
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan

$ apt search 'libusb-|hpaio' | grep installed

hplip/eoan,now 3.19.6+dfsg0-1ubuntu1 amd64 [installed,automatic]
libsane-hpaio/eoan,now 3.19.6+dfsg0-1ubuntu1 amd64 [installed,automatic]
libusb-1.0-0/eoan,now 2:1.0.23-1 amd64 [installed]

$ dmesg -w

[  741.512933] usb 3-2: USB disconnect, device number 4
[  744.814194] usb 1-10: new high-speed USB device number 9 using xhci_hcd
[  745.063489] usb 1-10: New USB device found, idVendor=03f0, idProduct=ad2a, bcdDevice= 1.00
[  745.063492] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  745.063493] usb 1-10: Product: HP ColorLaserJet MFP M278-M281
[  745.063494] usb 1-10: Manufacturer: HP
[  745.063495] usb 1-10: SerialNumber: <SERIALHERE>
[  745.167646] usblp 1-10:1.0: usblp0: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x03F0 pid 0xAD2A

$ scanimage
scanimage: open of device hpaio:/usb/HP_ColorLaserJet_MFP_M278-M281?serial=<SERIALHERE> failed: Error during device I/O

$ dmesg -w | tail -n 1
[  828.364816] usblp0: removed

# Now, I unplug and plug the printer

$ sudo sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
found USB scanner (vendor=0x03f0 [HP], product=0xad2a [HP ColorLaserJet MFP M278-M281]) at libusb:001:009
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

$ scanimage -L
device `hpaio:/usb/HP_ColorLaserJet_MFP_M278-M281?serial=<SERIALHERE>' is a Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one

$ hp-check -r
# output cut
PYEXT SCANCONF QUEUES PERMISSION                                                                                                                                                                            

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: ubuntu-19.10 version is not supported. Using ubuntu-19.04 versions dependencies to verify and install...

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

 Kernel: 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 GNU/Linux
 Host: ubuntu
 Proc: 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 GNU/Linux
 Distribution: ubuntu 19.10
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.19.6
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for ubuntu distro  19.10 version 

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

[hplip]
version=3.19.6

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.19.6
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[installation]
date_time = 11/08/19 20:41:54
version = 3.19.6


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 error: cups          CUPS - Common Unix Printing System                           REQUIRED        1.1             -               INCOMPAT   'CUPS may not be installed or not running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.27            OK         -
 error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.14         MISSING    'DBUS may not be installed or not running'
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.105           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.3          OK         -
 avahi-utils          avahi-utils                                                  OPTIONAL        -               0.7             OK         -

------------------------
| General Dependencies |
------------------------

 error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 error: cups-devel    CUPS devel- Common Unix Printing System development files    REQUIRED        -               -               MISSING    'cups-devel needs to be installed'
 error: cups-image    CUPS image - CUPS image development files                    REQUIRED        -               -               MISSING    'cups-image needs to be installed'
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.30'         OK         -
 error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
 error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'
 error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           -               MISSING    'libnetsnmp-devel needs to be installed'
 error: libcrypto     libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           MISSING    'libcrypto needs to be installed'
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.7.5           OK         -
 error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'
 error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4                         OPTIONAL        4.0             -               MISSING    'python3-pyqt4-dbus needs to be installed'
 error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x)         REQUIRED        4.0             -               MISSING    'python3-pyqt4 needs to be installed'
 python3-dbus         Python DBus - Python bindings for DBus                       REQUIRED        0.80.0          1.2.12          OK         -
 python3-xml          Python XML libraries                                         REQUIRED        -               2.2.7           OK         -
 error: python3-devel Python devel - Python development files                      REQUIRED        2.2             3.7.5           MISSING    'python3-devel needs to be installed'
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 862, in <module>
    num_errors, num_warns = dep.validate(time_flag, is_quiet_mode)
  File "/usr/bin/hp-check", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/bin/hp-check", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 372, in get_pil_version
    return Image.VERSION
AttributeError: module 'PIL.Image' has no attribute 'VERSION'

答案1

大约两年后,我再次尝试,这次使用 MFP M183fw。

我现在使用的是 20.04,它附带 3.20.3 版 hplip。现在一切都按预期工作,但是,我之前(我认为)不知道的是专有插件 ( hp-plugin -i) 的安装。

如果我不在新配置上安装插件,扫描仪的行为就会像问题中的那样 - 扫描仪被检测到,但扫描时出错。

基于上述情况,我猜测我没有安装该插件。

答案2

这里有两个问题:

  • PIL.Image 版本的问题是一个打包依赖错误 - 我将其报告为错误 1851918

  • 扫描仪的问题可能与 Python 成像有关,但即使二进制 HPLIP 安装程序也无法找到并安装正确的版本:

    安装缺少的可选依赖项
    ...
    警告:选项“扫描”缺少可选依赖项:pil(PIL - Python 图像库(使用 hp-scan 进行命令行扫描所需))
    警告:此安装程序无法为您的发行版/操作系统和/或版本安装“pil”。

    正在运行 SCANJET 依赖命令
    ...
    sudo apt-get install --assume-yes python-zbar (Scanjet-depend 步骤 9)
    警告:无法安装此 Scanjet 依赖包。某些 Scanjet 功能将无法使用。

    因此即使使用来自 HPLIP 站点的二进制 hplip 安装程序,扫描也无法进行。


最后,我建议安装 Ubuntu 18.04 LTS 以避免所有这一切噩梦。

相关内容