0

For a computer vision (Machine Learning) test I need to install OIDv4_ToolKit I'm following the instructions in the link. On centos 8 I've used: conda install --file requirements.txt

but then, when trying to run: python3 main.py -h

I get this error:

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

before that I had the same error but with libjpeg.so.8 , but I managed to solve it by finding it on my host:

sudo find / -name  libjpeg.so.8 

and then adding the directory found to LD_LIBRARY_PATH environment variable

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

I found an RPM that should contain the missing module here but after installing the rpm:

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

I get:

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)

when using --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)

when using --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!

Any Ideas?

2
  • If you are using CentOS 8, then why are there messages regarding Red Hat Subscription Management? If this is actually RHEL and not CentOS, then the system not being registered is the reason that it can't pull the dependencies for the package that you are attempting to install. Jan 30, 2021 at 19:52
  • That is my OS version: cat /etc/os-release NAME="CentOS Linux" VERSION="8 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="centos.org" BUG_REPORT_URL="bugs.centos.org" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="8"
    – Liran
    Jan 30, 2021 at 20:04

1 Answer 1

0

I installed https://github.com/EscVM/OIDv4_ToolKit following their instructions in a clean centos8 docker image.

I needed python-devel, gcc, make, cmake and the "development tools" bundle that was suggested at some point. Not QT.

Then I was able to run the python3 main.py -h command successfully.

Most likely you installed inappropriate package(s) on your system, perhaps by configuring wrong package sources or manually installing RPMs, and now you have a broken system rather than any issue with oidv4 toolkit.

You should NOT need to install any RPMs by hand - use dnf install package-name. You should NOT need to add package sources.

I suggest you start over in a clean install.

2
  • Thanks, but I wouldn't like to clean install my laptop with all SW on it. I'd like to find the problematic packages and reinstall them. is it possible?
    – Liran
    Feb 2, 2021 at 20:54
  • Once you get the installation working in a clean environment, compare the steps you performed to the ones you did earlier on your system, identify any differences and fix as needed.
    – D. SM
    Feb 6, 2021 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.