[CONPY-85] MariaDB Connector/Python requires MariaDB Connector/C >= 3.1.3, found version 3.1.10 Created: 2020-07-15  Updated: 2020-07-18  Resolved: 2020-07-15

Status: Closed
Project: MariaDB Connector/Python
Component/s: Installation
Affects Version/s: None
Fix Version/s: 1.0.1

Type: Bug Priority: Major
Reporter: V H Lemoine Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux Ubuntu 18.04 lts (32bit) / Mariadb 10.4.13



 Description   

*pip3 install mariadb failed *

after installing mariadb connector/c from source (see below) the pip3 install mariadb failed due to MariaDB Connector/Python requires MariaDB Connector/C >= 3.1.3, found version 3.1.10

The >=3.1.3 should not occur if 3.1.10 is found

mariadb connector install script/log:

rm -r mariadb-connector-c/
rm -r build
git clone https://github.com/MariaDB/mariadb-connector-c.git
mkdir build
cd build
cmake ../mariadb-connector-c/ -DCMAKE_INSTALL_PREFIX=/usr/local
make
make install

Install the project...
– Install configuration: "RelWithDebInfo"
– Installing: /usr/local/lib/mariadb/plugin/dialog.so
– Installing: /usr/local/lib/mariadb/plugin/client_ed25519.so
– Installing: /usr/local/lib/mariadb/plugin/caching_sha2_password.so
– Installing: /usr/local/lib/mariadb/plugin/sha256_password.so
– Installing: /usr/local/lib/mariadb/plugin/mysql_clear_password.so
– Installing: /usr/local/include/mariadb/mariadb_com.h
– Installing: /usr/local/include/mariadb/mysql.h
– Installing: /usr/local/include/mariadb/mariadb_stmt.h
– Installing: /usr/local/include/mariadb/ma_pvio.h
– Installing: /usr/local/include/mariadb/ma_tls.h
– Installing: /usr/local/include/mariadb/mariadb_version.h
– Installing: /usr/local/include/mariadb/ma_list.h
– Installing: /usr/local/include/mariadb/errmsg.h
– Installing: /usr/local/include/mariadb/mariadb_dyncol.h
– Installing: /usr/local/include/mariadb/mariadb_ctype.h
– Installing: /usr/local/include/mariadb/mariadb_rpl.h
– Installing: /usr/local/include/mariadb/mysqld_error.h
– Installing: /usr/local/include/mariadb/mysql/client_plugin.h
– Installing: /usr/local/include/mariadb/mysql/plugin_auth_common.h
– Installing: /usr/local/include/mariadb/mysql/plugin_auth.h
– Installing: /usr/local/include/mariadb/mariadb/ma_io.h
– Installing: /usr/local/lib/mariadb/libmariadbclient.a
– Installing: /usr/local/lib/mariadb/libmariadb.so.3
– Installing: /usr/local/lib/mariadb/libmariadb.so
– Installing: /usr/local/bin/mariadb_config
– Installing: /usr/local/lib/pkgconfig/libmariadb.pc

pip3 install nmariadb log

Collecting mariadb
Downloading https://files.pythonhosted.org/packages/8f/c9/7050899dc1066409a17e1147d3afe1b078e582afdb755c6d3cb9c9a5c3ab/mariadb-1.0.0.tar.gz (78kB)
100% |████████████████████████████████| 81kB 2.6MB/s
Complete output from command python setup.py egg_info:
10.4.3
MariaDB Connector/Python requires MariaDB Connector/C >= 3.1.3, found version 3.1.10

----------------------------------------
Command "python setup.py egg_info" failed with error code 2 in /tmp/pip-build-3j3fbw16/mariadb/



 Comments   
Comment by V H Lemoine [ 2020-07-15 ]

pip3 install log

pip3 -v install mariadb
Collecting mariadb
1 location(s) to search for versions of mariadb:

Comment by Georg Richter [ 2020-07-15 ]

Fixed. rev. c6ad169f8707352d138d27a324563f349ed5a2b3

Comment by V H Lemoine [ 2020-07-16 ]

The problem is caused in the installation script of mariadb which does an alphanumeric comparison instead of a numeric comparison to check versions. (3.1.3 is lower than 3.1.10, where 3.1.3. is higher than 3.1.1)

Pls ignore strikethrough!

The given answer was not the solution (for a Ubuntu 18.04 LTS Mariadb 10.4.13 compiled from source).

My solution is:

  1. Download and Compile the 3.1.9 mariadb connector/c (see script below)
  2. After install, in case your option -DCMAKE_INSTALL_PREFIX=/usr/local option is CMAKE is not /usr, do:
  • rm /usr/lib/libmariadb.so.3
  • ln -s /usr/local/lib/mariadb/libmariadb.so.3 /usr/lib/libmariadb.so.3
  1. then pip3 install mariadb

install script connector/c for ubuntu 18.04 lts and mariadb 10.4.13

script.sh

version=$1
rm r mariadb-connector-c$version/
rm -r build

wget O mariadb-connector-c$version.tar.gz https://downloads.mariadb.org/interstitial/connector-c-$version/mariadb-connector-c-3.1.9-src.tar.gz/from/http%3A//mirrors.supportex.net/mariadb/

tar xvf mariadb-connector-c$version.tar.gz

mkdir build
cd build

cmake ../mariadb-connector-c-$version-src/ -DCMAKE_INSTALL_PREFIX=/usr/local
make
make install

rm /usr/lib/libmariadb.so.3
ln -s /usr/local/lib/mariadb/libmariadb.so.3 /usr/lib/libmariadb.so.3

pip3 install mariadb

run

bash script.sh 3.1.9

Comment by Georg Richter [ 2020-07-16 ]

And what is wrong with the fix?

Comment by V H Lemoine [ 2020-07-16 ]

Sorry, but I can't see any mentioned fix by you. I only see this: Fixed. rev. c6ad169f8707352d138d27a324563f349ed5a2b3

Where I'm missing the point?

Comment by Georg Richter [ 2020-07-17 ]

This refers to the commit/revision number in git. See https://github.com/mariadb-corporation/mariadb-connector-python/commit/c6ad169f8707352d138d27a324563f349ed5a2b3 - the fix will be in 1.0.1

Comment by V H Lemoine [ 2020-07-18 ]

Generated at Thu Feb 08 03:30:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.