Centos 8にlibQtGui.so.4をインストールできません

Centos 8にlibQtGui.so.4をインストールできません

コンピュータビジョン(機械学習)テスト用にインストールする必要があります。OIDv4_toolkit リンクの指示に従います。 Centos 8では、conda install --filerequirements.txtを使用しました。

しかし、実行しようとすると:python3 main.py -h

次のエラーが発生します。

liran@localhost OIDv4_ToolKit]$ python3 main.py -h
Traceback (most recent call last):
  File "main.py", line 20, in <module>
    from modules.downloader import *
  File "/home/liran/dev/ComputerVisionRT/OIDv4_ToolKit/modules/downloader.py", line 2, in <module>
    import cv2
  File "/home/liran/anaconda3/lib/python3.7/site-packages/cv2/__init__.py", line 3, in <module>
    from .cv2 import *
ImportError: libQtGui.so.4: cannot open shared object file: No such file or directory

以前は、libjpeg.so.8を使用して同じエラーが発生しましたが、ホストシステムでそれを見つけて解決しました。

sudo find / -name  libjpeg.so.8 

次に、見つかったディレクトリをLD_LIBRARY_PATH環境変数に追加します。

export LD_LIBRARY_PATH=/path/to/file/:$LD_LIBRARY_PATH

不足しているモジュールを含める必要があるRPMが見つかりました。ここ ただし、rpmをインストールした後:

[liran@localhost OIDv4_ToolKit]$ sudo dnf install /path/to/rpm/qt-x11-4.8.7-9.el7_9.x86_64.rpm

私は得る:

Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
gitlab_gitlab-ee                                                                                                                                                                    36  B/s | 862  B     00:23    
gitlab_gitlab-ee-source                                                                                                                                                             37  B/s | 862  B     00:23    
Windscribe                                                                                                                                                                         255  B/s | 2.9 kB     00:11    
Error: 
 Problem: conflicting requests
  - nothing provides qt(x86-64) = 1:4.8.7-9.el7_9 needed by qt-x11-1:4.8.7-9.el7_9.x86_64
  - nothing provides libmng.so.1()(64bit) needed by qt-x11-1:4.8.7-9.el7_9.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

--nobestを使用する場合:

Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Windscribe                                                                                                                                                                         267  B/s | 2.9 kB     00:11    
Error: 
 Problem: conflicting requests
  - nothing provides qt(x86-64) = 1:4.8.7-9.el7_9 needed by qt-x11-1:4.8.7-9.el7_9.x86_64
  - nothing provides libmng.so.1()(64bit) needed by qt-x11-1:4.8.7-9.el7_9.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

--skip-brokenを使用する場合:

Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Windscribe                                                                                                                                                                         268  B/s | 2.9 kB     00:11    
Dependencies resolved.
Nothing to do.
Complete!

どんなアイデアがありますか?

ベストアンサー1

インストールしましたhttps://github.com/EscVM/OIDv4_ToolKitきれいなcentos8 dockerイメージの指示に従ってください。

python-devel、gcc、make、cmake、およびある時点では、提案された「開発ツール」パッケージが必要です。 QTではありません。

これにより、python3 main.py -hコマンドを正常に実行できます。

システムに不適切なパッケージをインストールした可能性があります(誤って設定されたパッケージソースまたはRPMの手動インストールを介して)。これで、oidv4ツールキットに問題が発生するのではなく、システムが破損しています。

RPMを手動でインストールする必要はありませんdnf install package-name。パッケージソースを追加する必要はありません。

新しくインストールして再起動することをお勧めします。

おすすめ記事