33
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

Organization

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

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
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
33
Help us understand the problem. What are the problem?