misp-modules v2.4.195 importlib.import_module("cv2") fails
What can be done to prevent this error from occurring when launching misp-modules v2.4.165 with MISP v2.4.167?
ERROR:root:libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/misp_modules/__init__.py", line 41, in <module>
from .modules import * # noqa
File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/__init__.py", line 1, in <module>
from .expansion import * # noqa
File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/expansion/qrcode.py", line 3, in <module>
import cv2
File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
uwhois module not installed.
not seeing this anymore in 2.4.169
Seeing this again in 2.4.195...
[20240815-170828] /entrypoint.sh starting
ERROR:root:libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/misp_modules/__init__.py", line 45, in <module>
from .modules import * # noqa
File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/__init__.py", line 1, in <module>
from .expansion import * # noqa
File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/expansion/qrcode.py", line 3, in <module>
import cv2
File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Try a more recent version.
Thx for the swift reply. 2.4.195 is pretty recent. You think this is fixed in 2.4.197?
I have good reasons to think so
OK, I cannot hit 2.4.197 yet, as I have to revise my Dockerfile as <= 2.4.195 I built using REQUIREMENTS which is no longer. On my first revised attempt it built a bogus docker image. I'll get back to that over the next week or so.
Why don't you try the official docker image? https://github.com/MISP/misp-docker
Also, you can now install misp-modules using pip: https://pypi.org/project/misp-modules/
Hey everyone,
I have installed 2.4.199 on a ubuntu 24.04.1.
I also had the problem with libgl1.so.1
I just found a post in another project and they said: install libgl1 so i did a sudo apt-get install libgl1 and that fixed the test through misp-modules -t
so maybe it needs to be written in the docs for a dependency
Good point 👍
Hey everyone,
I have installed
2.4.199on a ubuntu 24.04.1. I also had the problem with libgl1.so.1I just found a post in another project and they said: install
libgl1so i did asudo apt-get install libgl1and that fixed the test throughmisp-modules -tso maybe it needs to be written in the docs for a dependency
How did you install it?
Hey everyone, I have installed
2.4.199on a ubuntu 24.04.1. I also had the problem with libgl1.so.1 I just found a post in another project and they said: installlibgl1so i did asudo apt-get install libgl1and that fixed the test throughmisp-modules -tso maybe it needs to be written in the docs for a dependencyHow did you install it?
install what? misp-modules?
Yes, how did you install misp-modules?
Asking because the documentation (https://misp.github.io/misp-modules/install/) specifies the following steps:
Note that the dependencies will require a number of system packages installed. On Ubuntu these packages are libpoppler-cpp-dev, libzbar0, and tesseract-ocr. For an updated list, check the github action used to test the build inside .github/workflows.
And I wonder wether libgl1 might be a dependency of one of those packages.
Yes, how did you install
misp-modules?
i have "tried" both way.
pip install misp-modules but i can see it also had the git clone way.
regarding the system packages, i looked in that and workflows, the libgl1 package is not listed in there :)
@s-karberg yes, I know, I am asking whether you tried to install libpoppler-cpp-dev, libzbar0, and tesseract-ocr as specified in the readme, since libgl1 might actually be a dependency (let's just say that I have a strong feeling that is the case).
@s-karberg yes, I know, I am asking whether you tried to install
libpoppler-cpp-dev,libzbar0, andtesseract-ocras specified in the readme, sincelibgl1might actually be a dependency (let's just say that I have a strong feeling that is the case).
i did, didn't work :) they are installed.
In that case I agree we need to add it to the readme :)
I wonder why the CI/CD doesn't break though, that is weird. Would you be open to adding a test to reproduce the issue at test time?