Skip to content

Latest version (4.3.0.38) fails on import - libGL.so.1: cannot open shared object file: No such file or directory #370

Description

@LobsterMan

Expected behaviour

Since the update last night to version 4.3.0.38, our builds are breaking. On 4.3.0.36 all runs fine

Actual behaviour

On python:3.8 docker images (and also python:3.7), we are getting this

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import cv2
  File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Steps to reproduce

Dockerfile

FROM python:3.8

WORKDIR /app
COPY . .

RUN pip install -r requirements.txt

CMD ["python", "test.py"]

requirements.txt

opencv-python

test.py

import cv2
print('success')

Run docker build -t opencv-test:latest .
And then docker run opencv-test:latest

You will get the error written above.

If the version is set to 4.3.0.38 you will get:
success

Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions