每次网络打印机(使用 HP LaserJet 2055dn)都会因 cups 而停用。当您查看作业列表时,您会看到挂起的作业列表。打印机状态(计算机配置为德语,抱歉):
root@ubuntu:/var/log/cups# lpstat -p Printer_Tray2
Drucker Printer_Tray2 ist deaktiviert seit Fr 31 Mai 2019 15:58:03 CEST
unbekannter Grund
使用以下命令再次启用打印机后,它将再次打印所有作业,但由于某种原因,它稍后再次被停用:
cupsenable -E Printer_Tray2
我认为这与 apparmor 有关,但是我已禁用它进行尝试:
root@ubuntu:/var/log/cups# sudo systemctl status apparmor
● apparmor.service - AppArmor initialization
Loaded: loaded (/lib/systemd/system/apparmor.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:apparmor(7)
http://wiki.apparmor.net/
此外,在错误日志或访问日志中也没有什么特别的内容。在访问日志中你唯一能看到的是打印作业已成功发送。
我已经按照以下方式安装了打印机:
echo "Get the printer URL"
printer_url=`hp-makeuri -c 192.168.1.200 2>/dev/null`
echo "Install the printers (one printer per tray)"
lpadmin -p Printer_Tray2 -v ${printer_url} -P /usr/share/printer_drivers/HP_LaserJet_P2055x.ppd
lpadmin -p Printer_Tray3 -v ${printer_url} -P /usr/share/printer_drivers/HP_LaserJet_P2055x.ppd
echo "Enable the printers"
lpadmin -p Printer_Tray2 -E
lpadmin -p Printer_Tray3 -E
root@ubuntu:/var/spool/cups# dpkg -l | grep -i hplip
ii hplip 3.17.10+repack0-5 amd64 HP Linux Printing and Imaging System (HPLIP)
ii hplip-data 3.17.10+repack0-5 all HP Linux Printing and Imaging - data files