对于计算机视觉(机器学习)测试,我需要安装OIDv4_工具包 我正在按照链接中的说明进行操作。在 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
。您不需要添加包源。
我建议您重新开始全新安装。