アップグレード後のHPプリンタソフトウェアの回復(Arch Linux)

アップグレード後のHPプリンタソフトウェアの回復(Arch Linux)

最近アップグレードされ、すべての印刷機能が中断されたHPプリンタソフトウェアを実行しようとしています。私は継続的にアップグレードされるバージョンのアーチ(2021年2月28日現在、2014年10月5日バージョン)を実行しています。明らかに、彼らは今Qtを使用しています。だからそれは一種の要件です。それで、私はこのQt関連のすべての項目を構築するのに2時間を費やしました。 HPがLinuxユーザーに印刷できるように、未知のソフトウェアパッケージを構築するのに数時間を費やす必要があるのは狂っているようです。lpstat -aプリンタは準備ができていて、動作/アイドル状態ですが、何も印刷できないと言います。カップログには、「バックエンドエラー」が原因で印刷に失敗したことが表示されます。

それにもかかわらず、hp-setupは起動時に中止され、hp-checkはPyQt4がQtCoreを取得できないというエラーを表示します。これは、PyQtユーザーが実行しているQtのバージョンを確認する標準的な方法です。したがって、2つの間にある種のバージョンの競合があるようです。私のポイントリストの関連部分は次のとおりです。

パイオープンGL 3.1.5
pyOpenSSL 20.0.1
パイパーシング 2.4.7
PyQt3D 5.15.2
PyQt4-sip 4.19.24
PyQt5 5.15.2
PyQt5-sip 12.8.1
PyQtChart 5.15.2
PyQtデータの可視化5.15.2
PyQt調達 5.15.2
PyQtWebEngine 5.15.2

それでは、質問は私のシステムにPyQt5があり、HPソフトウェアにPyQt4が必要ですか?それでは、両方を同じシステムに置くことができますか?この問題を診断する手順は何ですか?

$ sudo find /usr -name "PyQt*"
/usr/share/qt/qsci/api/python/PyQtDataVisualization.api
/usr/share/qt/qsci/api/python/PyQtPurchasing.api
/usr/share/qt/qsci/api/python/PyQtWebEngine.api
/usr/share/qt/qsci/api/python/PyQt3D.api
/usr/share/qt/qsci/api/python/PyQt5.api
/usr/share/qt/qsci/api/python/PyQtChart.api
/usr/lib/qt/plugins/PyQt5
/usr/lib/python3.9/site-packages/PyQtChart-5.15.3.dist-info
/usr/lib/python3.9/site-packages/PyQt5_sip-12.8.1-py3.9.egg-info
/usr/lib/python3.9/site-packages/PyQtPurchasing-5.15.3.dist-info
/usr/lib/python3.9/site-packages/PyQt4
/usr/lib/python3.9/site-packages/PyQt5
/usr/lib/python3.9/site-packages/PyQt3D-5.15.3.dist-info
/usr/lib/python3.9/site-packages/PyQtDataVisualization-5.15.3.dist-info
/usr/lib/python3.9/site-packages/PyQt4_sip-4.19.24.dist-info
/usr/lib/python3.9/site-packages/PyQt5-5.15.3.dist-info
/usr/lib/python3.9/site-packages/PyQtWebEngine-5.15.3.dist-info
/usr/lib/python2.7/site-packages/PyQt4
/usr/lib/python2.7/site-packages/PyQt4_sip-4.19.24.dist-info

HPLIP_DEBUG=1 hp-setup の出力:


HP Linux Imaging and Printing System (ver. 3.21.2)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP 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.

hp-setup[711208]: debug: param=
hp-setup[711208]: debug: selected_device_name=None
hp-setup[711208]: debug: Using PyQt5
hp-setup[711208]: debug: Sys.argv=['/usr/bin/hp-setup'] printer_name=None param= jd_port=1 device_uri=None remove=False
hp-setup[711208]: debug: Starting GUI Event Loop...
Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
error: No devices found on bus: net
error:  HPLIP cannot detect printers in your network.  This may be due to existing firewall settings blocking the required ports.
                When you are in a trusted network environment, you may open the ports for network services like mdns and slp in the firewall. For detailed steps follow the link.
                 http://hplipopensource.com/node/374 

ベストアンサー1

たとえば、Ubuntu 20.10では、このhplipパッケージは実際にPyQt5()で実行されますpython3-pyqt5。また、Archでは、hplipパッケージバージョン3.21.2-1はQt 5を使用します。したがって、Qt 4をインストールする必要はありません。

使用されるQtバージョンは実際には次の構成で構成されています/etc/hp/hplip.conf

[configure]
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes

実行すると見つからないとhp-check言われますが、PyQt4最後にはリストされませんMissing Required Dependencies。私に尋ねたら、このツールはそれほど信頼できるものではありません。

Python側で何が起こっているのかを理解するために、まずQtバインディングがインストールされている場所を見つけようとしました。

$ find /usr -name "PyQt*"

システムには、それぞれ異なるパッケージディレクトリを持つ複数のバージョンのPythonがあります。すべての依存関係がインストールされていると思われるPythonインタプリタを使用して明示的にツールを呼び出してみてください。たとえば、次のようになります。

$ export HPLIP_DEBUG=1
$ python3.9 $(where hp-setup)

コンソール出力で何が間違っているかについてのヒントを取得したいと思います。

追加のステップはPythonデバッガを実行することです。

間違ったPythonインタプリタを使用している場合は、python正しいバージョンを指していることを確認してください。

$ python --version

しかし、今提供した追加のコンソール出力を見ると、これはPyQt / Qtとは関係がないと思います。特に以下の理由による。

error: No devices found on bus: net

検索(SLP)が失敗するため、これはネットワークに関連しているようです。

おすすめ記事