Debian

hplip/hpcups “libImageProcessor.so:無法打開共享對象文件:沒有這樣的文件或目錄”

  • August 9, 2020

我有 Debian 10 系統和 HP OfficeJet Pro 8020 列印機。Debian 10 不包含此型號的驅動程序。HP 提供64 位 Debian 的手動升級說明… Debian 版本 6。

您需要首先安裝的某些軟體包可能已更改名稱。我主要作弊 - 我使用apt build-dep hplip, 從舊的 Debian 版本中獲取所有建構依賴項。

建構成功。我現在可以看到特定列印機的驅動程序,並且可以在 CUPS 中進行設置。我的問題是它無法列印任何東西。

/var/log/cups/error_log包含這一行:

D [09/Aug/2020:16:33:07 +0100] [Job 194] Started filter /usr/lib/cups/filter/bannertopdf (PID 18088)
D [09/Aug/2020:16:33:07 +0100] [Job 194] Started filter /usr/lib/cups/filter/pdftopdf (PID 18089)
D [09/Aug/2020:16:33:07 +0100] [Job 194] Started filter /usr/lib/cups/filter/gstoraster (PID 18090)
D [09/Aug/2020:16:33:07 +0100] [Job 194] Started filter /usr/lib/cups/filter/hpcups (PID 18091)
D [09/Aug/2020:16:33:07 +0100] [Job 194] Started backend /usr/lib/cups/backend/ipp (PID 18092)
D [09/Aug/2020:16:33:07 +0100] [Job 194] 172.16.1.160: error while loading shared libraries: libImageProcessor.so: cannot open shared object file: No such file or directory
D [09/Aug/2020:16:33:07 +0100] [Job 194] PID 18091 (/usr/lib/cups/filter/hpcups) stopped with status 127 (File too large)
D [09/Aug/2020:16:33:07 +0100] [Job 194] Hint: Try setting the LogLevel to "debug" to find out more.

令人困惑的是,有時順序會發生變化,因此首先列印“stopped with status 127”。更令人困惑的是,在此錯誤之後還有更多日誌消息。其中之一是“斷管”,就好像 CUPS 設置了一個程序管道,當 hpcups 死亡時,所有程序都會崩潰。

D [09/Aug/2020:16:33:07 +0100] [Job 194] OUTFORMAT=\"(null)\", so output format will be CUPS/PWG Raster
D [09/Aug/2020:16:33:07 +0100] [Job 194] pdftopdf: Last filter determined by the PPD: hpcups; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.
D [09/Aug/2020:16:33:07 +0100] [Job 194] Sending stdin for job...
D [09/Aug/2020:16:33:07 +0100] [Job 194] STATE: +connecting-to-device
D [09/Aug/2020:16:33:07 +0100] [Job 194] Looking up \"172.16.1.160\"...
D [09/Aug/2020:16:33:07 +0100] [Job 194] STATE: -connecting-to-device
D [09/Aug/2020:16:33:07 +0100] [Job 194] 172.16.1.160=172.16.1.160
D [09/Aug/2020:16:33:07 +0100] [Job 194] PDF template file doesn\'t have form. It\'s okay.
D [09/Aug/2020:16:33:07 +0100] [Job 194] hrDeviceDesc=\"HP OfficeJet Pro 8020 series\"
D [09/Aug/2020:16:33:07 +0100] [Job 194] PID 18089 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [09/Aug/2020:16:33:07 +0100] [Job 194] Error: /ioerror in --showpage--
D [09/Aug/2020:16:33:07 +0100] [Job 194] Operand stack:
D [09/Aug/2020:16:33:07 +0100] [Job 194] true   (/var/spool/cups/tmp/gs_yQ9gF3)   --nostringval--   1   true
D [09/Aug/2020:16:33:07 +0100] [Job 194] Execution stack:
D [09/Aug/2020:16:33:07 +0100] [Job 194] %interp_exit   .runexec2   --nostringval--   showpage   --nostringval--   2   %stopped_push   --nostringval--   showpage   showpage   false   1   %stopped_push   1992   2   3   %oparray_pop   1991   2   3   %oparray_pop   1979   2   3   %oparray_pop   showpage   1980   4   3   %oparray_pop   showpage   showpage   2   1   1   showpage   %for_pos_int_continue   1983   4   7   %oparray_pop   showpage   showpage   1840   3   9   %oparray_pop   showpage   showpage
D [09/Aug/2020:16:33:07 +0100] [Job 194] Dictionary stack:
D [09/Aug/2020:16:33:07 +0100] [Job 194] --dict:736/1123(ro)(G)--   --dict:1/20(G)--   --dict:80/200(L)--   --dict:80/200(L)--   --dict:133/256(ro)(G)--   --dict:315/325(ro)(G)--   --dict:33/64(L)--   --dict:6/9(L)--   --dict:7/20(L)--
D [09/Aug/2020:16:33:07 +0100] [Job 194] Current allocation mode is local
D [09/Aug/2020:16:33:07 +0100] [Job 194] Last OS error: Broken pipe
D [09/Aug/2020:16:33:07 +0100] [Job 194] GPL Ghostscript 9.27: Unrecoverable error, exit code 1
D [09/Aug/2020:16:33:07 +0100] [Job 194] prtMarkerSuppliesMaxCapacity.1.3 = 100
D [09/Aug/2020:16:33:07 +0100] [Job 194] Rendering completed
D [09/Aug/2020:16:33:07 +0100] [Job 194] prtMarkerSuppliesMaxCapacity.1.4 = 100
D [09/Aug/2020:16:33:07 +0100] [Job 194] PID 18090 (/usr/lib/cups/filter/gstoraster) stopped with status 1.
D [09/Aug/2020:16:33:07 +0100] [Job 194] Hint: Try setting the LogLevel to "debug" to find out more.

我確認這是庫路徑的問題:

$ ldd /usr/lib/cups/filter/hpcups | grep libImageProcessor
   libImageProcessor.so => not found

請注意手冊說明中的此步驟:

./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build

中只有幾個文件/usr/lib64/,除了一個之外,所有文件都是由 hplip 安裝的。Debian 10 上正確的庫路徑是/usr/lib/x86_64-linux-gnu/. 如果您已經使用錯誤的路徑建構,請執行make clean. 然後,更改說明以改用此配置命令:

./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build

引用自:https://unix.stackexchange.com/questions/603644