When I use Python OpenCV and try to catch some image data i found this Error. ImportError: libGL.so.1: cannot open shared object file: problem solution here.
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
ImportError: libGL.so.1: cannot open shared object file Solution
The solution is very straightforward just you need to install ffmpeg libsm6 libxextb libraries.
For Raspberry Pi, Ubuntu
sudo apt-get install ffmpeg libsm6 libxext6 -y
For AlmaLinux, RockyLinux, centos
sudo dnf install mesa-libGL -y