I try to Build following Dockerfile:
FROM python:3.10
ENV TZ Europa/Berlin
# install google chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
RUN apt-get -y update
RUN apt-get install -y google-chrome-stable
# install chromedriver
RUN apt-get install -yqq unzip
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
# set display port to avoid crash
ENV DISPLAY=:99
# upgrade pip
RUN pip install --upgrade pip
# install selenium
RUN pip install selenium
# install mariadb
RUN apt-get install -y libmariadb-dev
RUN pip install mariadb
But i am not able to install mariadb, instead i receive following error:
"MariaDB Connector/Python requires MariaDB Connector/C >= 3.2.4, found version 3.1.16"
What can i do to solve this Problem?
CodePudding user response:
The MariaDB-10.5.15 version of libmariadb-dev corresponds to libmariadb-3.1.16.
Constrain the pip install mariadb
to a 1.0 version.
Alternately use a Debian bullseye (that corresponds the python base image) libmariadb-dev from the MariaDB Corporation repository.