CUPSを搭載したHPプリンタから印刷できません:「フィルタに失敗しました」

CUPSを搭載したHPプリンタから印刷できません:「フィルタに失敗しました」

BananaPiをプリンタサーバーとして使用する(Armbian Debian 10(buster))

次のコマンドを実行します。

  • 適性取付カップ
  • 適性プリンタドライバescprのインストール
  • 適性インストール hplip
  • 適性インストールhcupps

プリンタはwebguiを介してCUPSサーバーに追加されます。 Epsonプリンタは動作しますが、ジョブをHPプリンタに送信すると、次のエラーが発生します。 (stopped "Filter failed" 私はラズベリーパイでこれを実行しましたが、apt-getアップデート/アップグレード後にフィルタエラーが発生し始め、OSをアンインストールしました。新しいデバイスで新しく起動しました)

この問題について私が見つけることができるすべての解決策は、新しいドライバが必要であることを示すようです。

このプリンタ(hp m1319f)の2つのドライバソースが見つかりました。

適性によってインストールされたドライバは3.18.12です。私が知る限り、パッケージマネージャには古いバージョン/新しいバージョンオプションはありません。

最新のhplipを手動でダウンロードして.runファイルを実行してみましたが、結果は次のとおりです。

Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 70, in <module>
    import traceback
ValueError: bad marshal data (unknown type code)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 70, in <module>
    import traceback
ValueError: bad marshal data (unknown type code)
./hplip-install: line 20: [: : integer expression expected
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 70, in <module>
    import traceback
ValueError: bad marshal data (unknown type code)

手動で実行すると、./configure次の結果が表示されます。

...
checking for python3 version... 3.7
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.7/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.7/site-packages
checking for path to Python.h... Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils.sysconfig'
"using  ....  python3.7/Python.h"
checking python3.7/Python.h usability... no
checking python3.7/Python.h presence... no
checking for python3.7/Python.h... no
checking python3.7mu/Python.h usability... no
checking python3.7mu/Python.h presence... no
checking for python3.7mu/Python.h... no
checking python3.7m/Python.h usability... no
checking python3.7m/Python.h presence... no
checking for python3.7m/Python.h... no
configure: error: cannot find python-devel support

しかし、python-devはすでにインストールされており、python-develは存在しません。

sudo aptitude  install python-dev
python-dev is already installed at the requested version (2.7.16-1)
python-dev is already installed at the requested version (2.7.16-1)
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

/var/log/cups/error_log:

E [04/Aug/2020:11:33:01 -0400] [Job 12] Job stopped due to filter errors; please consult the /var/log/cups/error_log file for details.
D [04/Aug/2020:11:33:01 -0400] [Job 12] The following messages were recorded from 11:32:38 AM to 11:33:01 AM
D [04/Aug/2020:11:33:01 -0400] [Job 12] Applying default options...
D [04/Aug/2020:11:33:01 -0400] [Job 12] Adding start banner page "none".
D [04/Aug/2020:11:33:01 -0400] [Job 12] Adding end banner page "none".
D [04/Aug/2020:11:33:01 -0400] [Job 12] File of type application/vnd.cups-pdf-banner queued by "bananapi".
D [04/Aug/2020:11:33:01 -0400] [Job 12] hold_until=0
D [04/Aug/2020:11:33:01 -0400] [Job 12] Queued on "HP_LaserJet_M1319f_MFP" by "bananapi".
D [04/Aug/2020:11:33:01 -0400] [Job 12] time-at-processing=1596555158
D [04/Aug/2020:11:33:01 -0400] [Job 12] 4 filters for job:
D [04/Aug/2020:11:33:01 -0400] [Job 12] bannertopdf (application/vnd.cups-pdf-banner to application/pdf, cost 32)
D [04/Aug/2020:11:33:01 -0400] [Job 12] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [04/Aug/2020:11:33:01 -0400] [Job 12] gstoraster (application/vnd.cups-pdf to application/vnd.cups-raster, cost 99)
D [04/Aug/2020:11:33:01 -0400] [Job 12] hpcups (application/vnd.cups-raster to printer/HP_LaserJet_M1319f_MFP, cost 0)
D [04/Aug/2020:11:33:01 -0400] [Job 12] job-sheets=none,none
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[0]="HP_LaserJet_M1319f_MFP"
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[1]="12"
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[2]="bananapi"
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[3]="Test Page"
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[4]="1"
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[5]="job-uuid=urn:uuid:adfed0df-3ddc-3aa7-4824-6e3bd8baa838 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1596555158 time-at-processing=1596555158"
D [04/Aug/2020:11:33:01 -0400] [Job 12] argv[6]="/var/spool/cups/d00012-001"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[7]="CUPS_STATEDIR=/run/cups"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[8]="HOME=/var/spool/cups/tmp"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[10]="SERVER_ADMIN=root@bananapi"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[11]="SOFTWARE=CUPS/2.2.10"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[13]="USER=root"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[14]="CUPS_MAX_MESSAGE=2047"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[15]="CUPS_SERVER=/run/cups/cups.sock"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[17]="IPP_PORT=631"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[18]="CHARSET=utf-8"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[19]="LANG=en_US.UTF-8"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[20]="PPD=/etc/cups/ppd/HP_LaserJet_M1319f_MFP.ppd"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[21]="RIP_MAX_CACHE=128m"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[22]="CONTENT_TYPE=application/vnd.cups-pdf-banner"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[23]="DEVICE_URI=hp:/usb/HP_LaserJet_M1319f_MFP?serial=N810GF4"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[24]="PRINTER_INFO=HP LaserJet M1319f MFP"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[25]="PRINTER_LOCATION="
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[26]="PRINTER=HP_LaserJet_M1319f_MFP"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[27]="PRINTER_STATE_REASONS=none"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[28]="CUPS_FILETYPE=document"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-raster"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[30]="AUTH_I****"
D [04/Aug/2020:11:33:01 -0400] [Job 12] Started filter /usr/lib/cups/filter/bannertopdf (PID 2147)
D [04/Aug/2020:11:33:01 -0400] [Job 12] Started filter /usr/lib/cups/filter/pdftopdf (PID 2148)
D [04/Aug/2020:11:33:01 -0400] [Job 12] Started filter /usr/lib/cups/filter/gstoraster (PID 2149)
D [04/Aug/2020:11:33:01 -0400] [Job 12] Started filter /usr/lib/cups/filter/hpcups (PID 2150)
D [04/Aug/2020:11:33:01 -0400] [Job 12] Started backend /usr/lib/cups/backend/hp (PID 2151)
D [04/Aug/2020:11:33:01 -0400] [Job 12] pdftopdf: Last filter determined by the PPD: hpcups; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.
D [04/Aug/2020:11:33:01 -0400] [Job 12] OUTFORMAT=\"(null)\", so output format will be CUPS/PWG Raster
D [04/Aug/2020:11:33:01 -0400] [Job 12] PDF template file doesn\'t have form. It\'s okay.
D [04/Aug/2020:11:33:01 -0400] [Job 12] PID 2147 (/usr/lib/cups/filter/bannertopdf) exited with no errors.
D [04/Aug/2020:11:33:01 -0400] [Job 12] PID 2148 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [04/Aug/2020:11:33:01 -0400] [Job 12] Color Manager: Calibration Mode/Off
D [04/Aug/2020:11:33:01 -0400] [Job 12] Calling FindDeviceById(cups-HP_LaserJet_M1319f_MFP)
D [04/Aug/2020:11:33:01 -0400] [Job 12] Failed to send: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
D [04/Aug/2020:11:33:01 -0400] [Job 12] Failed to get find device cups-HP_LaserJet_M1319f_MFP
D [04/Aug/2020:11:33:01 -0400] [Job 12] Calling FindDeviceById(cups-HP_LaserJet_M1319f_MFP)
D [04/Aug/2020:11:33:01 -0400] [Job 12] Failed to send: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
D [04/Aug/2020:11:33:01 -0400] [Job 12] Failed to get device cups-HP_LaserJet_M1319f_MFP
D [04/Aug/2020:11:33:01 -0400] [Job 12] Color Manager: no profiles specified in PPD
D [04/Aug/2020:11:33:01 -0400] [Job 12] Set job-printer-state-message to "Color Manager: no profiles specified in PPD", current level=INFO
D [04/Aug/2020:11:33:01 -0400] [Job 12] Color Manager: ICC Profile: None
D [04/Aug/2020:11:33:01 -0400] [Job 12] Ghostscript using Any-Part-of-Pixel method to fill paths.
D [04/Aug/2020:11:33:01 -0400] [Job 12] Ghostscript command line: gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -sMediaType=Plain -sOutputType=0 -r600x600 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dcupsBitsPerColor=1 -dcupsColorOrder=0 -dcupsColorSpace=3 -dcupsRowCount=1 -dcupsRowStep=2 -dcupsInteger0=1 -scupsPageSizeName=Letter -I/usr/share/cups/fonts -c \'<</.HWMargins[18.000000 15.500000 18.000000 15.500000] /Margins[0 0]>>setpagedevice\' -f -_
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[0]=\"CUPS_CACHEDIR=/var/cache/cups\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[1]=\"CUPS_DATADIR=/usr/share/cups\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[2]=\"CUPS_DOCROOT=/usr/share/cups/doc-root\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[3]=\"CUPS_FONTPATH=/usr/share/cups/fonts\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[4]=\"CUPS_REQUESTROOT=/var/spool/cups\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[5]=\"CUPS_SERVERBIN=/usr/lib/cups\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[6]=\"CUPS_SERVERROOT=/etc/cups\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[7]=\"CUPS_STATEDIR=/run/cups\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[8]=\"HOME=/var/spool/cups/tmp\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[9]=\"PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[10]=\"SERVER_ADMIN=root@bananapi\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[11]=\"SOFTWARE=CUPS/2.2.10\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[12]=\"TMPDIR=/var/spool/cups/tmp\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[13]=\"USER=root\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[14]=\"CUPS_MAX_MESSAGE=2047\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[15]=\"CUPS_SERVER=/run/cups/cups.sock\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[16]=\"CUPS_ENCRYPTION=IfRequested\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[17]=\"IPP_PORT=631\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[18]=\"CHARSET=utf-8\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[19]=\"LANG=en_US.UTF-8\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[20]=\"PPD=/etc/cups/ppd/HP_LaserJet_M1319f_MFP.ppd\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[21]=\"RIP_MAX_CACHE=128m\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[22]=\"CONTENT_TYPE=application/vnd.cups-pdf-banner\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[23]=\"DEVICE_URI=hp:/usb/HP_LaserJet_M1319f_MFP?serial=N810GF4\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[24]=\"PRINTER_INFO=HP LaserJet M1319f MFP\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[25]=\"PRINTER_LOCATION=\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[26]=\"PRINTER=HP_LaserJet_M1319f_MFP\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[27]=\"PRINTER_STATE_REASONS=none\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[28]=\"CUPS_FILETYPE=document\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[29]=\"FINAL_CONTENT_TYPE=application/vnd.cups-raster\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] envp[30]=\"AUTH_INFO_REQUIRED=none\"
D [04/Aug/2020:11:33:01 -0400] [Job 12] Start rendering...
D [04/Aug/2020:11:33:01 -0400] [Job 12] Set job-printer-state-message to "Start rendering...", current level=INFO
D [04/Aug/2020:11:33:01 -0400] [Job 12] Processing page 1...
D [04/Aug/2020:11:33:01 -0400] [Job 12] Set job-printer-state-message to "Processing page 1...", current level=INFO
D [04/Aug/2020:11:33:01 -0400] [Job 12] STATE: +connecting-to-device
D [04/Aug/2020:11:33:01 -0400] [Job 12] STATE: +hplip.plugin-error
D [04/Aug/2020:11:33:01 -0400] [Job 12] prnt/hpcups/HPCupsFilter.cpp 489: m_Job initialization failed with error = 48
D [04/Aug/2020:11:33:01 -0400] [Job 12] double free or corruption (!prev)
D [04/Aug/2020:11:33:01 -0400] [Job 12] PID 2150 (/usr/lib/cups/filter/hpcups) crashed on signal 6.
D [04/Aug/2020:11:33:01 -0400] [Job 12] Hint: Try setting the LogLevel to "debug" to find out more.
D [04/Aug/2020:11:33:01 -0400] [Job 12] Processing page 2...
D [04/Aug/2020:11:33:01 -0400] [Job 12] STATE: -connecting-to-device
D [04/Aug/2020:11:33:01 -0400] [Job 12] STATE: -media-empty-error,media-jam-error,hplip.plugin-error,cover-open-error,toner-empty-error,other
D [04/Aug/2020:11:33:01 -0400] [Job 12] Rendering completed
D [04/Aug/2020:11:33:01 -0400] [Job 12] PID 2149 (/usr/lib/cups/filter/gstoraster) exited with no errors.
D [04/Aug/2020:11:33:01 -0400] [Job 12] prnt/backend/hp.c 376: read new pjl status: 10023
D [04/Aug/2020:11:33:01 -0400] [Job 12] prnt/backend/hp.c 378: read pjl job_end: 0
D [04/Aug/2020:11:33:01 -0400] [Job 12] prnt/backend/hp.c 376: read new pjl status: 10001
D [04/Aug/2020:11:33:01 -0400] [Job 12] ready to print
D [04/Aug/2020:11:33:01 -0400] [Job 12] PID 2151 (/usr/lib/cups/backend/hp) exited with no errors.
D [04/Aug/2020:11:33:01 -0400] [Job 12] End of messages
D [04/Aug/2020:11:33:01 -0400] [Job 12] printer-state=3(idle)
D [04/Aug/2020:11:33:01 -0400] [Job 12] printer-state-message="ready to print"
D [04/Aug/2020:11:33:01 -0400] [Job 12] printer-state-reasons=none

Openprintingのppdも問題を解決できません。

私が見つけた1つの奇妙なことは、ドライバが私のプリンタが色であると言う::(HP LaserJet m1319f MFP, hpcups 3.18.12, requires proprietary plugin (color, 2-sided printing)

混乱しています。間違ったマーシャルデータに対するこのソリューションを見ましたが、私の場合は適用されないようです。https://stackoverflow.com/questions/30861493/how-to-fix-python-valueerrorbad-marshal-data

答え1

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

これで問題が解決しました。 http://foo2zjs.rkkda.com/

答え2

システムログを確認する必要があります。プラグインは、hpcupsバージョンと比較して古い可能性があります。

hpcups[1888334]: common/utils.c 140: validate_plugin_version() Plugin version[3.21.2] mismatch with HPLIP version[3.22.10]
hpcups[1888334]: common/utils.c 173: Plugin version is not matching
hpcups[1888334]: prnt/hpcups/HPCupsFilter.cpp 505: m_Job initialization failed with error = 48
hpcups[1888334]: common/utils.c 244: Invalid Library handler pLibHandler = NULL.

この場合、hp-setup -iアップデートを実行してください。foo2zjs他の回答で提案したように、ドライバなどに切り替える必要はありません。

関連情報