E: Package 'libmysqlclient-dev' has no installation candidate 

I am using this blog for reference: https://rehalcon.blogspot.com/2018/03/dockerize-your-django-app-for-local.html

Here is my docker file:

    FROM python:2-slim
    LABEL org.label-schema.name='app-dj'

    RUN apt-get clean && \
        apt-get update && \
        apt-get install -y \
        curl \
        vim \
        tmux \
        build-essential \
        libjpeg-dev \
        libpq-dev \
        python-dev  \
        libmysqlclient-dev && \
        pip install -U pip 3to2

    COPY requirements.txt req.txt
    RUN  pip install -r /req.txt

    RUN mkdir -p /app
    WORKDIR /app
    EXPOSE 8069
    CMD python /app/server.py
  • I'm having a similar issue on Ubuntu 14.04. What version are you using?
    – Bindelstif
    Jun 12 '18 at 21:37
  • 1
    I was using the docker image python:2-slim, this above docker file is working for Ubuntu:16.04 Jun 13 '18 at 10:39
  • 2
    It seems different versions point to slightly different repos. I was able to get it to work with the default-libmysqlclient-dev package instead.
    – Bindelstif
    Jun 13 '18 at 19:05

Try to use:

default-libmysqlclient-dev in your Dockerfile

instead of libmysqlclient-dev


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.