Install libjpeg.so.8 Debian 11 inside Docker

Viewed 725

I tried to integrate an application - QCPump - inside an existing Docker, with an other application - QAtrack+. The goal is to use QCPump inside QAtrack+.

The application code seems to be integrated but when I launch it, I have an error :

ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

The error is raised by the wxPython package.

Okay, so I have to install it. Unfortunately, my Docker linux is Debian 11, and Debian seems to grab this package several years ago. So, after some reseach, I found that this package is "replaced" - for Debian - by libjpeg-dev. So, I did it. And same result ...

I found the code of the librairy (wxPython) and a docker part has done for Debian 10 : https://github.com/wxWidgets/Phoenix/blob/master/docker/build/debian-10/Dockerfile

I took this part and integrated it in my DockerFile :

RUN apt-get install -y \
            freeglut3 \
            freeglut3-dev \
            libgl1-mesa-dev \
            libglu1-mesa-dev \
            libgstreamer-plugins-base1.0-dev \
            libgtk-3-dev \
            libjpeg-dev \
            libnotify-dev \
            libsdl2-dev \
            libsm-dev \
            libtiff-dev \
            libwebkit2gtk-4.0-dev \
            libxtst-dev; \
    apt-get clean;

But same ...

In some forum, people mentionned the LD have to be update. I tried this way but I am not pretty sure :

RUN export LD_LIBRARY_PATH=/usr/local/lib

And to be honest, I am not sure this is the problem and so the solution here...

Any idea about this problem ?

Following, my complete DockerFile if you need it ;)

FROM python:3.6

RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' >             /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update && apt-get install -y \
cron postgresql-client-10 cifs-utils dos2unix \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get install tzdata
ENV TZ 'Europe/Paris'
RUN dpkg-reconfigure -f noninteractive tzdata
RUN touch /root/.is_inside_docker

RUN pip install virtualenv

RUN date "+%H:%M:%S   %d/%m/%y"

RUN apt-get -q update && \
apt-get install -yq chromium && \
rm -rf /var/lib/apt/lists/*

RUN apt-get update -y && apt-get install -y libsdl2-ttf-2.0-0 && \
apt-get update -y && apt-get install -y libjpeg-dev libaio1 libaio-dev && \
wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-    0_1.2.54-1ubuntu1_amd64.deb \
  && dpkg -i /tmp/libpng12.deb \
  && rm /tmp/libpng12.deb \
  && apt-get install -y \
            freeglut3 \
            freeglut3-dev \
            libgl1-mesa-dev \
            libglu1-mesa-dev \
            libgstreamer-plugins-base1.0-dev \
            libgtk-3-dev \
            libjpeg-dev \
            libnotify-dev \
            libsdl2-dev \
            libsm-dev \
            libtiff-dev \
            libwebkit2gtk-4.0-dev \
            libxtst-dev; \
    apt-get clean;

RUN export LD_LIBRARY_PATH=/usr/local/lib


WORKDIR /usr/src/qatrackplus
0 Answers
Related