我安装了 CUPS 并添加了打印机,但如果打印任何内容,我总是看到“过滤失败”错误。您能检查一下哪里出了问题吗?
E [04/Jan/2019:19:50:40 +0000] [Job 13] Unable to open raster stream - : Broken pipe
E [04/Jan/2019:19:50:44 +0000] [Job 13] Job stopped due to filter errors; please consult the error_log file for details.
D [04/Jan/2019:19:50:44 +0000] [Job 13] The following messages were recorded from 19:50:40 to 19:50:44
D [04/Jan/2019:19:50:44 +0000] [Job 13] Applying default options...
D [04/Jan/2019:19:50:44 +0000] [Job 13] Adding start banner page "none".
D [04/Jan/2019:19:50:44 +0000] [Job 13] Queued on "POS-80-Series" by "root".
D [04/Jan/2019:19:50:44 +0000] [Job 13] Auto-typing file...
D [04/Jan/2019:19:50:44 +0000] [Job 13] Request file type is text/plain.
D [04/Jan/2019:19:50:44 +0000] [Job 13] File of type text/plain queued by "root".
D [04/Jan/2019:19:50:44 +0000] [Job 13] Adding end banner page "none".
D [04/Jan/2019:19:50:44 +0000] [Job 13] time-at-processing=1546631440
D [04/Jan/2019:19:50:44 +0000] [Job 13] 4 filters for job:
D [04/Jan/2019:19:50:44 +0000] [Job 13] texttopdf (text/plain to application/pdf, cost 32)
D [04/Jan/2019:19:50:44 +0000] [Job 13] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [04/Jan/2019:19:50:44 +0000] [Job 13] gstoraster (application/vnd.cups-pdf to application/vnd.cups-raster, cost 99)
D [04/Jan/2019:19:50:44 +0000] [Job 13] rastertopos (application/vnd.cups-raster to printer/POS-80-Series, cost 0)
D [04/Jan/2019:19:50:44 +0000] [Job 13] job-sheets=none,none
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[0]="POS-80-Series"
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[1]="13"
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[2]="root"
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[3]="send.txt"
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[4]="1"
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[5]="finishings=3 number-up=1 job-uuid=urn:uuid:9c0423ec-3d23-30ab-65e0-845325a1931c job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1546631440 time-at-processing=1546631440 document-name-supplied=send.txt"
D [04/Jan/2019:19:50:44 +0000] [Job 13] argv[6]="/var/spool/cups/d00013-001"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[7]="CUPS_STATEDIR=/run/cups"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[8]="HOME=/var/spool/cups/tmp"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[10]="SERVER_ADMIN=root@pizzalinkess"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[11]="SOFTWARE=CUPS/2.2.8"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[13]="USER=root"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[14]="CUPS_MAX_MESSAGE=2047"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[15]="CUPS_SERVER=/run/cups/cups.sock"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[17]="IPP_PORT=631"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[18]="CHARSET=utf-8"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[19]="LANG=en.UTF-8"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[20]="PPD=/etc/cups/ppd/POS-80-Series.ppd"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[21]="RIP_MAX_CACHE=128m"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[22]="CONTENT_TYPE=text/plain"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[23]="DEVICE_URI=socket://zxy.ddns.net:9100"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[24]="PRINTER_INFO=POS-80-Series"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[25]="PRINTER_LOCATION="
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[26]="PRINTER=POS-80-Series"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[27]="PRINTER_STATE_REASONS=none"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[28]="CUPS_FILETYPE=document"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-raster"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[30]="AUTH_I****"
D [04/Jan/2019:19:50:44 +0000] [Job 13] Started filter /usr/lib/cups/filter/texttopdf (PID 9475)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Started filter /usr/lib/cups/filter/pdftopdf (PID 9476)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Started filter /usr/lib/cups/filter/gstoraster (PID 9477)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Started filter /usr/lib/cups/filter/rastertopos (PID 9478)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Started backend /usr/lib/cups/backend/socket (PID 9479)
D [04/Jan/2019:19:50:44 +0000] [Job 13] PID 9478 (/usr/lib/cups/filter/rastertopos) stopped with status 102 (No such file or directory)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Hint: Try setting the LogLevel to "debug" to find out more.
D [04/Jan/2019:19:50:44 +0000] [Job 13] OUTFORMAT=\"(null)\", so output format will be CUPS/PWG Raster
D [04/Jan/2019:19:50:44 +0000] [Job 13] Page = 227x595; 11,0 to 215,595
D [04/Jan/2019:19:50:44 +0000] [Job 13] pdftopdf: Last filter determined by the PPD: rastertopos; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.
D [04/Jan/2019:19:50:44 +0000] [Job 13] execv failed: No such file or directory
D [04/Jan/2019:19:50:44 +0000] [Job 13] STATE: +connecting-to-device
D [04/Jan/2019:19:50:44 +0000] [Job 13] Looking up \"zxy.ddns.net\"...
D [04/Jan/2019:19:50:44 +0000] [Job 13] STATE: -connecting-to-device
D [04/Jan/2019:19:50:44 +0000] [Job 13] blabla.ddns.net=45.150.247.146
D [04/Jan/2019:19:50:44 +0000] [Job 13] PID 9475 (/usr/lib/cups/filter/texttopdf) exited with no errors.
D [04/Jan/2019:19:50:44 +0000] [Job 13] PID 9476 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [04/Jan/2019:19:50:44 +0000] [Job 13] Color Manager: Calibration Mode/Off
D [04/Jan/2019:19:50:44 +0000] [Job 13] Calling FindDeviceById(cups-POS-80-Series)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Found device /org/freedesktop/ColorManager/devices/cups_POS_80_Series
D [04/Jan/2019:19:50:44 +0000] [Job 13] Calling org.freedesktop.ColorManager.Device.Get(ProfilingInhibitors)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Calling FindDeviceById(cups-POS-80-Series)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Found device /org/freedesktop/ColorManager/devices/cups_POS_80_Series
D [04/Jan/2019:19:50:44 +0000] [Job 13] Calling GetProfileForQualifiers(Gray.....)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Found profile /org/freedesktop/ColorManager/profiles/POS_80_Series_Gray__
D [04/Jan/2019:19:50:44 +0000] [Job 13] Calling org.freedesktop.ColorManager.Profile.Get(Filename)
D [04/Jan/2019:19:50:44 +0000] [Job 13] Use profile filename: \'\'
D [04/Jan/2019:19:50:44 +0000] [Job 13] Color Manager: ICC Profile:
D [04/Jan/2019:19:50:44 +0000] [Job 13] Ghostscript using Any-Part-of-Pixel method to fill paths.
D [04/Jan/2019:19:50:44 +0000] [Job 13] Ghostscript command line: gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r203x203 -dDEVICEWIDTHPOINTS=227 -dDEVICEHEIGHTPOINTS=595 -dcupsBitsPerColor=1 -dcupsColorOrder=0 -dcupsColorSpace=3 -scupsPageSizeName=X80mmY210mm -I/usr/share/cups/fonts -c \'<</.HWMargins[11.000000 0.000000 12.000000 0.000000] /Margins[0 0]>>setpagedevice\' -f -_
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[0]=\"CUPS_CACHEDIR=/var/cache/cups\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[1]=\"CUPS_DATADIR=/usr/share/cups\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[2]=\"CUPS_DOCROOT=/usr/share/cups/doc-root\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[3]=\"CUPS_FONTPATH=/usr/share/cups/fonts\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[4]=\"CUPS_REQUESTROOT=/var/spool/cups\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[5]=\"CUPS_SERVERBIN=/usr/lib/cups\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[6]=\"CUPS_SERVERROOT=/etc/cups\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[7]=\"CUPS_STATEDIR=/run/cups\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[8]=\"HOME=/var/spool/cups/tmp\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[9]=\"PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[10]=\"SERVER_ADMIN=root@pizzalinkess\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[11]=\"SOFTWARE=CUPS/2.2.8\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[12]=\"USER=root\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[13]=\"CUPS_MAX_MESSAGE=2047\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[14]=\"CUPS_SERVER=/run/cups/cups.sock\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[15]=\"CUPS_ENCRYPTION=IfRequested\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[16]=\"IPP_PORT=631\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[17]=\"CHARSET=utf-8\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[18]=\"LANG=en.UTF-8\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[19]=\"PPD=/etc/cups/ppd/POS-80-Series.ppd\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[20]=\"RIP_MAX_CACHE=128m\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[21]=\"CONTENT_TYPE=text/plain\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[22]=\"DEVICE_URI=socket://zxy.ddns.net:9100\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[23]=\"PRINTER_INFO=POS-80-Series\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[24]=\"PRINTER_LOCATION=\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[25]=\"PRINTER=POS-80-Series\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[26]=\"PRINTER_STATE_REASONS=none\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[27]=\"CUPS_FILETYPE=document\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[28]=\"FINAL_CONTENT_TYPE=application/vnd.cups-raster\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] envp[29]=\"AUTH_INFO_REQUIRED=none\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] Start rendering...
D [04/Jan/2019:19:50:44 +0000] [Job 13] Processing page 1...
D [04/Jan/2019:19:50:44 +0000] [Job 13] Error: /ioerror in --showpage--
D [04/Jan/2019:19:50:44 +0000] [Job 13] Operand stack:
D [04/Jan/2019:19:50:44 +0000] [Job 13] true (/tmp/gs_oJ2BOA) --nostringval-- 1 true
D [04/Jan/2019:19:50:44 +0000] [Job 13] Execution stack:
D [04/Jan/2019:19:50:44 +0000] [Job 13] %interp_exit .runexec2 --nostringval-- showpage --nostringval-- 2 %stopped_push --nostringval-- showpage showpage false 1 %stopped_push 2045 2 3 %oparray_pop 2044 2 3 %oparray_pop 2025 2 3 %oparray_pop showpage 2026 4 3 %oparray_pop showpage showpage 2 1 1 showpage %for_pos_int_continue 2029 4 7 %oparray_pop showpage showpage 1890 3 9 %oparray_pop showpage showpage
D [04/Jan/2019:19:50:44 +0000] [Job 13] Dictionary stack:
D [04/Jan/2019:19:50:44 +0000] [Job 13] --dict:969/1684(ro)(G)-- --dict:1/20(G)-- --dict:83/200(L)-- --dict:83/200(L)-- --dict:133/256(ro)(G)-- --dict:310/450(ro)(G)-- --dict:32/32(L)-- --dict:6/9(L)-- --dict:6/20(L)--
D [04/Jan/2019:19:50:44 +0000] [Job 13] Current allocation mode is local
D [04/Jan/2019:19:50:44 +0000] [Job 13] Last OS error: Broken pipe
D [04/Jan/2019:19:50:44 +0000] [Job 13] GPL Ghostscript 9.26: Unrecoverable error, exit code 1
D [04/Jan/2019:19:50:44 +0000] [Job 13] Rendering completed
D [04/Jan/2019:19:50:44 +0000] [Job 13] PID 9477 (/usr/lib/cups/filter/gstoraster) stopped with status 1.
D [04/Jan/2019:19:50:44 +0000] [Job 13] Hint: Try setting the LogLevel to "debug" to find out more.
D [04/Jan/2019:19:50:44 +0000] [Job 13] hrDeviceDesc=\"Unknown\"
D [04/Jan/2019:19:50:44 +0000] [Job 13] prtGeneralCurrentLocalization type is 0, expected 2!
D [04/Jan/2019:19:50:44 +0000] [Job 13] backendWaitLoop(snmp_fd=5, addr=0x5573538f0e48, side_cb=0x557352cab1d0)
D [04/Jan/2019:19:50:44 +0000] [Job 13] PID 9479 (/usr/lib/cups/backend/socket) exited with no errors.
D [04/Jan/2019:19:50:44 +0000] [Job 13] End of messages
D [04/Jan/2019:19:50:44 +0000] [Job 13] printer-state=3(idle)
D [04/Jan/2019:19:50:44 +0000] [Job 13] printer-state-message="Rendering completed"
D [04/Jan/2019:19:50:44 +0000] [Job 13] printer-state-reasons=none
答案1
希望将其添加给后代,以防将来有人遇到类似的错误。
我正在运行 Raspberry Pi 和 Debian/Raspbian Bullseye,并尝试让 Rollo 热敏标签打印机与 CUPS 配合使用。
截至撰写本文时,Debian 正在跟踪 Ghostscript 9.53。CUPS 正在调用 gstoraster 过滤器,后者又调用 ghostscript,后者崩溃并显示类似以下错误消息:
E [14/Dec/2021:19:47:45 +0000] [Job 5] Unable to open raster stream - : Broken pipe
D [14/Dec/2021:19:47:45 +0000] [Job 5] Error: /ioerror in --showpage--
D [14/Dec/2021:19:47:45 +0000] [Job 5] Operand stack:
D [14/Dec/2021:19:47:45 +0000] [Job 5] true (/var/spool/cups/tmp/gs_tmfIcM) --nostringval-- 1 true
D [14/Dec/2021:19:47:45 +0000] [Job 5] Execution stack:
D [14/Dec/2021:19:47:45 +0000] [Job 5] %interp_exit .runexec2 --nostringval-- showpage --nostringval-- 2 %stopped_push --nostringval-- showpage showpage false 1 %stopped_push 1990 2 3 %oparray_pop 1989 2 3 %oparray_pop 1977 2 3 %oparray_pop showpage 1978 4 3 %oparray_pop showpage showpage 2 1 1 showpage %for_pos_int_continue 1981 4 7 %oparray_pop showpage showpage 1840 3 9 %oparray_pop showpage showpage
D [14/Dec/2021:19:47:45 +0000] [Job 5] Dictionary stack:
D [14/Dec/2021:19:47:45 +0000] [Job 5] --dict:741/1123(ro)(G)-- --dict:1/20(G)-- --dict:80/200(L)-- --dict:80/200(L)-- --dict:133/256(ro)(G)-- --dict:320/325(ro)(G)-- --dict:33/64(L)-- --dict:6/9(L)-- --dict:7/20(L)--
D [14/Dec/2021:19:47:45 +0000] [Job 5] Current allocation mode is local
D [14/Dec/2021:19:47:45 +0000] [Job 5] Last OS error: Broken pipe
D [14/Dec/2021:19:47:45 +0000] [Job 5] GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
我正是这样做来修复的:
添加以下行到/etc/apt/sources.list
:deb http://raspbian.raspberrypi.org/raspbian/ oldstable main contrib non-free rpi
sudo apt update
检查输出apt-cache policy ghostscript
ghostscript:
Installed: 9.53.3~dfsg-7+deb11u1
Candidate: 9.53.3~dfsg-7+deb11u1
Version table:
*** 9.53.3~dfsg-7+deb11u1 500
500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
100 /var/lib/dpkg/status
9.27~dfsg-2+deb10u4 500
500 http://raspbian.raspberrypi.org/raspbian oldstable/main armhf Packages
然后,您需要安装 ghostscript 的降级版本及其依赖项。我使用以下命令执行此操作:
sudo apt install ghostscript=9.27~dfsg-2+deb10u4 libgs9=9.27~dfsg-2+deb10u4 libgs9-common=9.27~dfsg-2+deb10u4
然后它就成功了!!
答案2
我刚刚解决了一个与此非常相似的问题。为了解决这个问题,我将“oldstable”添加到我的 Debian sources.list,然后我能够降级几个软件包。我降级了:
- 打印机驱动程序 hpcups 升级至 3.16.11+repack0-3
- ghostscript、ghostsctipt-x、libgs9、libgs9-common 至 9.26a~dfsg-0+deb9u2
答案3
我今天遇到了类似的问题;以前工作的打印机拒绝打印,状态为“过滤器失败”。
通过将 Ghostscript 降级到之前的版本,它再次正常工作:
$ apt-cache policy ghostscript
ghostscript:
Installed: 9.26a~dfsg-0+deb9u1
Candidate: 9.27~dfsg-1
Version table:
9.27~dfsg-1 500
500 http://ftp.debian.org/debian testing/main amd64 Packages
*** 9.26a~dfsg-0+deb9u1 500
500 http://ftp.de.debian.org/debian stable/main amd64 Packages
现在我持有该版本并关注他们的下一个更新日志。
答案4
按照说明进行操作,包括添加到特定存储库的 alow-downgrade-insecure=yes 选项。
仍然有以下错误:
root@raspberrypi:/home/pi# apt-get install ghostscript=9.27~dfsg-2+deb10u4 libgs 9=9.27~dfsg-2+deb10u4 libgs9-common=9.27~dfsg-2+deb10u4 正在读取软件包列表...完成 正在构建依赖关系树...完成 正在读取状态信息...完成 E:未找到“ghostscript”的版本“9.27~dfsg-2+deb10u4” E:未找到“libgs9”的版本“9.27~dfsg-2+deb10u4” E:未找到“libgs9-common”的版本“9.27~dfsg-2+deb10u4”
有什么建议吗?