|
主题:网络打印机安装失败.hplip, cups表现都不太正常
(网络打印机的问题已经解决)
实验室局域网内最近添加了一台网络打印机,通过印机上的网口连入交换机,接入局域网。打印机的型号为 HP P2055n。Windows用户按照附赠的光盘“下一步”、“下一步”就能找到打印机。Linux用户就得自己折腾CUPS和hplip。但是,hp-setup配置通不过,提示找不到PPD文件(实际上所需文件是存在的);后来改用CUPS的 Web Interface 添加打印机,添加成功,打印测试页成功,但是在gnome中无法看到,gnome-cups-manager提示无法连接到CUPS服务器。
我参照的是下面两份资料:
Getoo Wiki CUPS
http://en.gentoo-wiki.com/wiki/CUPS
Gentoo Wiki Hplip
http://www.gentoo-wiki.info/HPLIP
安装了hplip。其中,hplip 添加了cups, ppds的USE Flags. CUPS因为依赖关系,在安装hplip时被带了进来。我所安装的hplip、CUPS版本以及USE Flags如下:
net-print/hplip
Installed versions: 3.9.8 (cups cupsddk dbus gtk ppds snmp -doc -fax -minimal -parport -policykit -qt3 -qt4 -scanner)
net-print/cups
Installed versions: 1.3.10-r2 (X acl avahi dbus gnutls jpeg linguas_en linguas_zh_TW pam perl png ppds python samba ssl tiff zeroconf -java -kerberos -ldap -linguas_de -linguas_es -linguas_et -linguas_fr -linguas_he -linguas_id -linguas_it -linguas_ja -linguas_pl -linguas_sv -php -slp -static -xinetd)
按照CUPS Wiki的指示,以root身份运行hplip中的工具 hp-setup 配置打印机 (之前已经启动cups服务):
一切看起来还算顺利:
- HP Linux Imaging and Printing System (ver. 3.9.8)
- Printer/Fax Setup Utility ver. 9.0
- Copyright (c) 2001-9 Hewlett-Packard 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.
- (Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)
- --------------------------------
- | SELECT CONNECTION (I/O) TYPE |
- --------------------------------
- Num Connection Description
- Type
- -------- ---------- ----------------------------------------------------------
- 0* usb Universal Serial Bus (USB)
- 1 net Network/Ethernet/Wireless (direct connection or JetDirect)
- Enter number 0...1 for connection type (q=quit, enter=usb*) ? 1
- Using connection type: net
- Using device: hp:/net/HP_LaserJet_P2055dn?zc=NPI96EE9A
- Setting up device: hp:/net/HP_LaserJet_P2055dn?zc=NPI96EE9A
- ---------------------
- | PRINT QUEUE SETUP |
- ---------------------
- Please enter a name for this print queue (m=use model name:'HP_LaserJet_P2055dn'*, q=quit) ?
复制代码
然后,问题发生了:
- Locating PPD file... Please wait.
- error: No PPD found for model laserjet_p2055dn using new algorithm. Trying old algorithm...
- error: No PPD found for model laserjet_p2055dn using old algorithm.
- error: Unable to find an appropriate PPD file.
- Would you like to specify the path to the correct PPD file to use (y=yes, n=no*, q=quit) ?
复制代码
这就奇怪了,给2205dn用的PPD命名就在机子上:
- find ./ -iname '*2055dn*'
- ./share/ppd/HP/hp-laserjet_p2055dn-pcl3.ppd.gz
- ./share/ppd/HP/hp-laserjet_p2055dn-ps.ppd.gz
复制代码
后来尝试了 hplip 的其他两个版本:
3.9.4b-r1 问题一模一样
2.8.6b-r1 根本找不到网络打印机
hplip暂时作罢,改用 CUPS 的 Web Interface 来配置: http://localhost:631/
添加比较顺利,打印测试页成功,如图所示。
但是在 Gnome 应用程序的“打印”中无法看到这个打印机。耐着性子,装了一个gnome-cups-manager,但是,点开时提示“无法连接到CUPS服务器”,如图所示。
觉得匪夷所思,老子的CUPS明明是打开了,后来借用hplip的check.py,发现,hplip也认为CUPS是没有打开的。不知大家在安装HP网络打印机时有没有遇到这样的麻烦事?
- # ./check.py
- HP Linux Imaging and Printing System (ver. 3.9.8)
- Dependency/Version Check Utility ver. 14.3
- Copyright (c) 2001-9 Hewlett-Packard 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.
- Note: hp-check can be run in three modes:
- 1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine
- if the proper dependencies are installed to successfully compile HPLIP.
- 2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built
- HPLIP supplied tarball has the proper dependencies installed to successfully run.
- 3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and
- run-time dependencies).
- Saving output in log file: hp-check.log
- Initializing. Please wait...
-
- ---------------
- | SYSTEM INFO |
- ---------------
- Basic system information:
- Linux frontlab 2.6.30-gentoo-r6 #3 SMP Wed Sep 9 21:39:33 CST 2009 i686 Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz GenuineIntel GNU/Linux
- Distribution:
- gentoo 0.0
- Checking Python version...
- OK, version 2.6.2 installed
- Checking PyQt 4.x version...
- error: NOT FOUND OR FAILED TO LOAD!
- Checking for CUPS...
- error: Status: (Not available. CUPS may not be installed or not running.)
- Checking for dbus/python-dbus...
- dbus daemon is running.
- python-dbus version: 0.83.0
- ------------------------------------
- | COMPILE AND RUNTIME DEPENDENCIES |
- ------------------------------------
- note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
- note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).
- Checking for dependency: CUPS - Common Unix Printing System...
- error: NOT FOUND! This is a REQUIRED/RUNTIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
- Checking for dependency: CUPS DDK - CUPS driver development kit...
- OK, found.
- Checking for dependency: CUPS devel- Common Unix Printing System development files...
- OK, found.
- Checking for dependency: CUPS image - CUPS image development files...
- OK, found.
- Checking for dependency: DBus - Message bus system...
- OK, found.
- Checking for dependency: gcc - GNU Project C and C++ Compiler...
- OK, found.
- Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
- OK, found.
- Checking for dependency: libcrypto - OpenSSL cryptographic library...
- OK, found.
- Checking for dependency: libjpeg - JPEG library...
- OK, found.
- Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
- OK, found.
- Checking for dependency: libpthread - POSIX threads library...
- OK, found.
- Checking for dependency: libtool - Library building support services...
- OK, found.
- Checking for dependency: libusb - USB library...
- OK, found.
- Checking for dependency: make - GNU make utility to maintain groups of programs...
- OK, found.
- Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
- OK, found.
- Checking for dependency: PolicyKit - Administrative policy framework...
- warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
- Checking for dependency: PyQt 4 DBus - DBus Support for PyQt4...
- error: NOT FOUND! This is a REQUIRED/RUNTIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
- Checking for dependency: Python DBus - Python bindings for DBus...
- OK, found.
- Checking for dependency: Python devel - Python development files...
- OK, found.
- Checking for dependency: Python libnotify - Python bindings for the libnotify Desktop notifications...
- warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
- Checking for dependency: Python XML libraries...
- OK, found.
- Checking for dependency: Python 2.3 or greater - Required for fax functionality...
- OK, found.
- Checking for dependency: Python 2.2 or greater - Python programming language...
- OK, found.
- Checking for dependency: Reportlab - PDF library for Python...
- warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
- Checking for dependency: SANE - Scanning library...
- error: NOT FOUND! This is a REQUIRED/RUNTIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
- Checking for dependency: SANE - Scanning library development files...
- error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
- Checking for dependency: scanimage - Shell scanning program...
- warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
- Checking for dependency: xsane - Graphical scanner frontend for SANE...
- warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
- ----------------------
- | HPLIP INSTALLATION |
- ----------------------
- Currently installed HPLIP version...
- HPLIP 3.9.8 currently installed in '/usr/share/hplip'.
- Current contents of '/etc/hp/hplip.conf' file:
- # hplip.conf. Generated from hplip.conf.in by configure.
- [hplip]
- version=3.9.8
- [dirs]
- home=/usr/share/hplip
- run=/var/run
- ppd=/usr/share/ppd/HP
- ppdbase=/usr/share/ppd
- doc=/usr/share/doc/hplip-3.9.8
- icon=/usr/share/applications
- cupsbackend=/usr/libexec/cups/backend
- cupsfilter=/usr/libexec/cups/filter
- drv=/usr/share/cups/drv/hp
- # Following values are determined at configure time and cannot be changed.
- [configure]
- network-build=yes
- pp-build=no
- gui-build=no
- scanner-build=no
- fax-build=no
- dbus-build=yes
- cups11-build=no
- doc-build=no
- shadow-build=no
- hpijs-install=no
- foomatic-drv-install=no
- foomatic-ppd-install=no
- foomatic-rip-hplip-install=no
- hpcups-install=yes
- cups-drv-install=yes
- cups-ppd-install=yes
- internal-tag=3.9.8.36
- restricted-build=no
- ui-toolkit=no
- qt3=no
- qt4=no
- policy-kit=no
- hpijs-only-build=no
- lite-build=no
- udev-acl-rules=yes
- Current contents of '/var/lib/hp/hplip.state' file:
- # hplip.state - HPLIP runtime persistent variables.
- [plugin]
- installed=0
- eula=0
- Current contents of '~/.hplip/hplip.conf' file:
- --------------------------
- | DISCOVERED USB DEVICES |
- --------------------------
- No devices found.
- ---------------------------------
- | INSTALLED CUPS PRINTER QUEUES |
- ---------------------------------
-
- /usr/bin/lpstat
- ---------------
- Type: Unknown
- Device URI: Unable to connect to server
- ---------------------
- | PYTHON EXTENSIONS |
- ---------------------
- Checking 'cupsext' CUPS extension...
- OK, found.
- Checking 'pcardext' Photocard extension...
- OK, found.
- Checking 'hpmudext' I/O extension...
- OK, found.
-
- ---------------
- | USER GROUPS |
- ---------------
- root bin daemon sys adm disk wheel floppy dialout tape video games vmware
- -----------
- | SUMMARY |
- -----------
- error: 11 errors and/or warnings.
- Please refer to the installation instructions at:
- http://hplip.sourceforge.net/install/index.html
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|