[Error] ImportError: libGL.so.1: cannot open shared object file: No such file or directory

    728x90
    ImportError: libGL.so.1: cannot open shared object file: No such file or directory

     

    도커 이미지에서 opencv를 설치하고 실행하려고 할 때, 위와 같은 오류가 발생할 수 있음.

    이럴 경우 이미지 빌드를 위해 Docker file 안에 아래 문구로 설치를 해주면 해결됨

     

    apt-get update

    먼저 update를 해주고

     

    apt-get -y install liblgl1-mesa-glx

     

    ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

    apt-get install libglib2.0-0
    
    apt-get update && apt-get install ffmpeg libsm6 libxext6  -y

     

    modulenotfounderror: no module named 'cv2'

    pip install opencv-python
    728x90

    댓글