내 BananaPi를 프린터 서버로 사용하기(Armbian Debian 10(buster))
다음 명령을 실행하십시오.
- 적성 설치 컵
- 적성 프린터 드라이버 escpr 설치
- 적성 설치 hplip
- 적성 설치 hcupps
프린터는 webgui를 통해 CUPS 서버에 추가됩니다. Epson 프린터는 작동하지만 작업을 HP 프린터로 보내면 다음 오류가 발생합니다. ( stopped "Filter failed"
저는 라즈베리 파이에서 이것을 실행했지만 apt-get 업데이트/업그레이드 후에 필터 오류가 발생하기 시작하여 OS를 제거했습니다. 새 장치에서 새로 시작했습니다)
이 문제에 대해 내가 찾을 수 있는 모든 해결책은 새 드라이버가 필요하다는 것을 나타내는 것 같습니다.
이 프린터(hp m1319f)에 대한 두 가지 드라이버 소스를 찾았습니다.
- https://developers.hp.com/hp-linux-imaging-and-printing/gethplip(최신 : 3.20.6)
- https://www.openprinting.org/driver/foo2zjs-z1
적성에 의해 설치된 드라이버는 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도 문제를 해결할 수 없습니다.
제가 발견한 한 가지 이상한 점은 드라이버가 내 프린터가 컬러라고 말합니다: :( 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
다른 답변에서 제안하는 것처럼 드라이버 등 으로 전환할 필요가 없습니다 .