64
46

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenCVをPythonで動かそうとしてlibGL.soが無いって言われたけど解決した。

Posted at

Docker上でOpenCVのPythonBindingを動かそうとしたらエラーがでた。

import cv2
ImportError: libGL.so.1: cannot open shared object fil e: No such file or directory

Dockerfile

FROM continuumio/anaconda3
RUN apt-get update
RUN conda install opencv -c conda-forge
RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0rc0-cp36-cp36m-linux_x86_64.whl
COPY run.py /run.py
CMD python /run.py

以下のコマンドで解決した。

# apt-get install -y libgl1-mesa-dev

他の人に聞いたら以下のコマンドでも解決したらしい。

# apt-get install -y libglib2.0-0 libsm6 libxrender1 libxext6
64
46
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
64
46

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?