RedHat 7:lpadmin 找不到 HP ppd 文件?
我正在嘗試從命令行在 RedHat 7.5 系統上添加列印機,如下所示:
/sbin/lpadmin -p printername -v socket://printerfqdn:9100 -m hp-laserjet_3015-ps.ppd.gz -L "Room number goes here" -E
此命令失敗並顯示以下錯誤消息:
lpadmin: Unable to copy PPD file.
我安裝了與 HP 相關的軟體包:
hpijs.x86_64 hplip.x86_64 hplip-common.x86_64 hplip-libs.x86_64 I found that this error happens because the PPD file that I had specified with `-m ` is located in `/usr/share/ppd/HP` (from the hpijs RPM), but apparently cups only looks in `/usr/share/cups/model`
當然,一個簡單的解決方法是創建一個從預期位置到實際文件位置的連結,但我確信 RedHat 故意創建了這個目錄結構。
從命令行在 RedHat 7 上安裝 HP Laserjet 3015 的官方方法是什麼?
編輯:
命令:
lpinfo -m | grep 3015
顯示以下內容:
foomatic-db-ppds/Epson/epl6200.ppd.gz EPSON EPL-6200 PS3 v3015.102 foomatic-db-ppds/Epson/epln2500.ppd.gz EPSON EPL-N2500 PS3 v3015.102 foomatic-db-ppds/Epson/epln2550.ppd.gz EPSON EPL-N2550 PS3 v3015.102 foomatic-db-ppds/Epson/epln3000.ppd.gz EPSON EPL-N3000 PS3 v3015.102 foomatic-db-ppds/Epson/epln7000.ppd.gz EPSON EPL-N7000 PS3 v3015.102 gutenprint.5.2://hp-lj_3015/expert HP LaserJet 3015 - CUPS+Gutenprint v5.2.9 gutenprint.5.2://hp-lj_3015/simple HP LaserJet 3015 - CUPS+Gutenprint v5.2.9 Simplified foomatic:HP-LaserJet_3015-gutenprint-ijs-simplified.5.2.ppd HP LaserJet 3015 Foomatic/gutenprint-ijs-simplified.5.2 foomatic:HP-LaserJet_3015-gutenprint-ijs.5.2.ppd HP LaserJet 3015 Foomatic/gutenprint-ijs.5.2 foomatic:HP-LaserJet_3015-Postscript.ppd HP LaserJet 3015 Foomatic/Postscript drv:///hp/hpijs.drv/hp-laserjet_3015-hpijs-pcl3.ppd HP LaserJet 3015 hpijs pcl3, 3.15.9 drv:///hp/hpcups.drv/hp-laserjet_3015-pcl3.ppd HP LaserJet 3015 pcl3, hpcups 3.15.9 hp-laserjet_3015-ps.ppd.gz HP LaserJet 3015 Postscript lsb/usr/HP/hp-laserjet_3015-ps.ppd.gz HP LaserJet 3015 Postscript
這是在我已經使用上述連結解決方法之後進行的。在另一台 HP 列印機上使用類似的命令會顯示:
[root@mycomputer ~]# lpinfo -m | grep m1522 lsb/usr/HP/hp-laserjet_m1522_mfp-ps.ppd.gz HP LaserJet M1522 MFP Series Postscript lsb/usr/HP/hp-laserjet_m1522n_mfp-ps.ppd.gz HP LaserJet M1522 MFP Series Postscript lsb/usr/HP/hp-laserjet_m1522nf_mfp-ps.ppd.gz HP LaserJet M1522 MFP Series Postscript drv:///hp/hpijs.drv/hp-laserjet_m1522nf_mfp-hpijs-pcl3.ppd HP LaserJet m1522nf MFP hpijs pcl3, 3.15.9 drv:///hp/hpcups.drv/hp-laserjet_m1522nf_mfp-pcl3.ppd HP LaserJet m1522nf MFP pcl3, hpcups 3.15.9
您必須使用 lpinfo 輸出中的“完整”路徑:
/sbin/lpadmin -p printername -v socket://printerfqdn:9100 -m lsb/usr/HP/hp-laserjet_3015-ps.ppd.gz -L "Room number goes here" -E