无法在 Ubuntu 18.04 中安装 HP Deskjet 2540

无法在 Ubuntu 18.04 中安装 HP Deskjet 2540

我安装了hpliphplip-data然后我启动了 HPLIP Toolbox GUI。我单击“添加打印机”,然后收到一条消息(见图),提示PPD未找到文件。当我单击“浏览”时,我发现了一些 .gz 文件,如果选中,它们都无法解决问题。

HP 设备管理器设置对话框

然后

选择 PPD 文件对话框

我的 Ubuntu 是 Ubuntu 18.04

输出apt-cache policy hplip hplip-gui

hplip:
  Installed: 3.17.10+repack0-5
  Candidate: 3.17.10+repack0-5
  Version table:
 *** 3.17.10+repack0-5 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
hplip-gui:
  Installed: 3.17.10+repack0-5
  Candidate: 3.17.10+repack0-5
  Version table:
 *** 3.17.10+repack0-5 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status

下列的这个帖子,我做到了:

  1. sudo apt-get install hplip-gui
  2. hp-setup

我得到了 HP 设备管理器的 GUI。我的打印机通过 USB 连接。因此我选择USB然后Next。然后我转到另一个带有标题的页面从发现的设备中选择,其中列出了我的打印机。我单击我的打印机,然后Next。然后我在终端中看到此信息。

HP Linux Imaging and Printing System (ver. 3.17.10)
Printer/Fax Setup Utility ver. 9.0

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

Searching... (bus=usb, search=(None), desc=0)
error: No PPD found for model deskjet_2540 using old algorithm.
error: No appropriate print PPD file found for model deskjet_2540_series

答案1

/usr/share/hplip/data/models/models.dat它应该无需 PPD 文件即可工作。即使在最新的 HPLIP 3.19.3 中也没有声明它。

因此你需要安装所有 HPLIP 内容

sudo apt-get install hplip-gui hpijs-ppds

然后按照hp-setup向导操作。

如果hp-setup失败,则尝试安装所有已知的打印机驱动程序

sudo apt-get install printer-driver-all

并使用system-config-printer

相关内容