Debian 配置打印机驱动
一 准备与安装
sudo apt update && sudo apt install cups cups-client cups-bsd foomatic-filterssudo apt install hplip(HP 设备推荐,支持更多型号与功能)sudo systemctl enable --now cups二 添加打印机与选择驱动
lpinfo -vlpadmin -p HP402dn -E -v socket://192.168.1.50 -m drv:///hp/hpcups.drv/hp-laserjet_402dn.ppdlpadmin -d HP402dnlp -d <打印机名> /usr/share/cups/data/testprint三 驱动获取与手动安装
sudo apt install ./xxx.deb 安装。wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz tar zxf foo2zjs.tar.gz && cd foo2zjs make sudo make install sudo make cups # 重启 CUPS 或 systemctl restart cups sudo cp your-filter /usr/lib/cups/filter/your-filter sudo chmod 755 /usr/lib/cups/filter/your-filter sudo cp your-ppd.ppd /usr/share/cups/model/ sudo systemctl restart cups 四 共享与远程访问
Listen 0.0.0.0:631 <Location /> Order deny,allow Allow from 192.168.1.0/24 </Location> <Location /admin> Order deny,allow Allow from 192.168.1.0/24 </Location> sudo systemctl restart cups五 常见问题与排查
lsusb 确认设备存在;重启 CUPS:sudo systemctl restart cupstail -n 50 /var/log/cups/error_log