Issues with MariaDB "Connector C" for Python dbase connection

2 hours ago 1
ARTICLE AD BOX

OS: Linux Mint 22.2 (based on Ubuntu 24.04) MariaDB version: 15.1

I have MariaDB all set up on my system and I have also set up an ODBC data source.

Now I want to be able to interact between Python scripts to link to my databases. The aim is to pip install mariadb: but an attempt to do that meets with ... ERROR: Could not build wheels for mariadb ... eventually I find that I apparently have to install MariaDB's "Connector C" first.

I've been following this page. I've chosen the "CS package repository" option. I've got to the instruction sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6"

The response to this is "Could not identify OS type or version". And it then gives a list of supported Linux distros and versions:

mike@M15:~$ sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6" # [error] Could not identify OS type or version. # [error] # The MariaDB Repository only supports these distributions: # * RHEL/Rocky 8, 9, & 10 (rhel) # * RHEL/CentOS 7 (rhel) # * Ubuntu 20.04 LTS (focal), 22.04 LTS (jammy), and 24.04 LTS (noble) # * Debian 11 (bullseye), Debian 12 (bookworm), and Debian 13 (trixie) # * SLES 12 & 15 (sles)

... but Linux Mint 22.2 is based on Ubuntu 24.04, and I find there are 2 useful switches : --os-type and --os-version. If I just use the first I get a message saying "the version must be included if the OS type is". Fine. I do this:

mike@M15:~$ sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6" --os-type=ubuntu --os-version=24.04 # [info] Skipping OS detection and using OS type 'ubuntu' and version '24.04' as given on the command line # [error] --os-type='ubuntu' with --os-version='24.04' is an invalid combination # [error] # The MariaDB Repository only supports these distributions: # * RHEL/Rocky 8, 9, & 10 (rhel) # * RHEL/CentOS 7 (rhel) # * Ubuntu 20.04 LTS (focal), 22.04 LTS (jammy), and 24.04 LTS (noble) # * Debian 11 (bullseye), Debian 12 (bookworm), and Debian 13 (trixie) # * SLES 12 & 15 (sles)

Over the next few minutes I try many conceivable combinations: 'Ubuntu' (leading cap), also '24.04 LTS (noble)', completely spelt out ... sometimes with apostrophes around things, sometimes not ... and on and on and on. Each attempt gets "is an invalid combination".

Anyone on Mint or Ubuntu got beyond this point?

PS it strikes me that a possible way of setting up this connection might be to use the ODBC data sources (pyodbc?) instead of banging my head against the wall of MariaDB's setup instructions. I have a suspicion that might produce a slower connection though: anyone know?

Read Entire Article