Uninstall BUILT mariadb-connector for python

50 views Asked by At

I recently started to have some problem with mariadb in python and i decided to upgrade my connector since on another machine its running fine.

Any idea how i can uninstall the connector?

Tried: I installed python 3.11 and followed this to install the new connector: found here

mkdir -p /tmp/mdbccbin
cd /tmp/mdbccbin

curl -O https://downloads.mariadb.com/Connectors/c/connector-c-3.1.10/mariadb-connector-c-3.1.10-ubuntu-bionic-amd64.tar.gz

echo "1b5b513f44967efadf5eae5e34952cd61f94655575d45b5a9182ea1b91d1d1fa  mariadb-connector-c-3.1.10-ubuntu-bionic-amd64.tar.gz" | sha256sum -c

# get root
sudo su

tar xvf mariadb-connector-c-3.1.10-ubuntu-bionic-amd64.tar.gz --directory /usr --strip-components 1

echo "/usr/lib/mariadb/" > /etc/ld.so.conf.d/mariadb.conf
ldconfig

# back to regular user
exit

python3 -m pip install --user mariadb

It didnt work, i still had the error: 'ImportError: MariaDB Connector/Python was build with MariaDB Connector/C 3.3.5, while the loaded MariaDB Connector/C library has version 3.3.4.'

So i installed it the way i originally installed the connector (found in the thread as above):

wget https://archive.mariadb.org//connector-c-3.3.1/mariadb-connector-c-3.3.1-src.zip
unzip mariadb-connector-c-3.3.1-src.zip
cd mariadb-connector-c-3.3.1-src/
mkdir build
cd build/
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
make
sudo make install

I still got the error "ImportError: MariaDB Connector/Python was build with MariaDB Connector/C 3.3.5, while the loaded MariaDB Connector/C library has version 3.3.4." when doing pip install mariadb.

0

There are 0 answers