pythondockermariadb

MariaDB in Docker - MariaDB Connector/Python was build with MariaDB Connector/C version 3.3.3, but loaded Connector/C library has version 10.3.39


I can't figure out the error in my Docker container.

I am using python:3.9-buster

i am downloading, I think, the correct Connector/C version for MariaDB

RUN wget https://dlm.mariadb.com/2678574/Connectors/c/connector-c-3.3.3/mariadb-connector-c-3.3.3-debian-bullseye-amd64.tar.gz \
    -O mariadb-connector-c.tar.gz && \
    tar -xzf mariadb-connector-c.tar.gz --strip-components=1 -C /usr && \
    rm mariadb-connector-c.tar.gz

But I can't figure out why I'm still getting the error.

The full error line if that helps

/app/.venv/lib/python3.9/site-packages/mariadb/connections.py:85: RuntimeWarning: MariaDB Connector/Python was build with MariaDB Connector/C version 3.3.3 but loaded Connector/C library has version 10.3.39

I followed the trace of this post: Mariadb in Docker: MariaDB Connector/Python requires MariaDB Connector/C >= 3.2.4, found version 3.1.16 but it did not work


Solution

  • updating my Dockerfile this way did the trick. in my base stage, i added

    RUN apt-get install libmariadb3 libmariadb-dev -y