连接打印机和树莓派,点击Add Printer添加打印机,在弹出的窗口中输入对应的用户信息,使用在上一步中用户组中添加的用户
然后按着一步步的指引,选择HP LaserJet 1020打印机,然后按照提示,选择和名称对应的驱动,我们会发现 LaserJet 1020 对应驱动会提示:HP laserjet requires proprietary plugin,也就是我们不仅需要这个通用的驱动,而且需要一些额外的插件,打印机才能正常工作。
查阅资料发现:HP官方已经给出了说明,我们需要查看hplip版本,然后安装对应的驱动插件。
首先我们查看一下版本,发现是3.20.3版本
$ sudo apt show hplip
Package: hplip
Version: 3.20.3+dfsg0-2
Priority: optional
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers [email protected]
Original-Maintainer: Debian Printing Team [email protected]
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 518 kB
然后在 插件列表 中找到 3.20.3 对应的hplip-3.20.3-plugin.run和hplip-3.20.3-plugin.run.asc,使用wget下载到树莓派本地。
Package: hplip
Version: 3.17.10+repack0-5
Priority: optional
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Printing Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,595 kB
Depends: adduser, cups, hplip-data (= 3.17.10+repack0-5), libhpmud0 (= 3.17.10+repack0-5), libsane-hpaio (= 3.17.10+repack0-5), lsb-base, printer-driver-hpcups (= 3.17.10+repack0-5), python3-dbus, python3-gi, python3-pexpect, python3-pil, python3-reportlab, wget, python3 (<< 3.7), xz-utils, python3 (>= 3.6~), libc6 (>= 2.17), libcups2 (>= 1.6.0), libdbus-1-3 (>= 1.9.14), libsane1 (>= 1.0.24)
Recommends: avahi-daemon, policykit-1, printer-driver-postscript-hp, sane-utils
Suggests: hplip-doc, hplip-gui, python3-notify2, system-config-printer
Homepage: https://developers.hp.com/hp-linux-imaging-and-printing
Task: ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop-share, lubuntu-gtk-desktop, lubuntu-desktop, lubuntu-qt-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Supported: 5y
Download-Size: 1,030 kB
APT-Manual-Installed: yes
APT-Sources: http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic/main arm64 Packages
Description: HP Linux Printing and Imaging System (HPLIP)
运行 hp-setup -i 使用命令行进行安装,按照提示命令,进行插件的安装。
[scode type=“yellow”]这里建议提前下好安装,而不是直接联网下载,速度较快,指定路径需要为绝对路径[/scode]
至此,我们可以尝试使用手机或者电脑搜索打印机来进行打印测试,没有其他意外的话,可以发现打印成功!