Djent
Djent

Reputation: 3467

mysql_config not found with mysql-community on CentOS 7

I need to install mysqlclient module for python3.6 on my CentOS server via pip.
The instalation breaks with following error: OSError: mysql_config not found.
I've found a solution, to install mysql-devel package, but unfortunately it breaks with following error:

Error: mariadb101u-config conflicts with mysql-community-server-8.0.4-0.1.rc.el7.x86_64
Error: mariadb101u-libs conflicts with mysql-community-libs-8.0.4-0.1.rc.el7.x86_64
Error: mariadb101u-libs conflicts with mysql-community-libs-compat-8.0.4-0.1.rc.el7.x86_64
Error: mariadb101u-common conflicts with mysql-community-common-8.0.4-0.1.rc.el7.x86_64

I cannot remove the mysql-community packages, because the server is running MySQL database based on that.
Is there any way to fix it without removing conflicting packets?

Upvotes: 5

Views: 17369

Answers (3)

Solution by @Djent worked for me.

But I kept on receiving time out error while installing through yum. If you are having the same problem. You can manually download the package and install it! On CentOS

wget https://archive.mariadb.org/mariadb-10.1.39/yum/centos7-amd64/rpms/MariaDB-10.1.38-centos73-x86_64-devel.rpm
rpm -i MariaDB-10.1.38-centos73-x86_64-devel.rpm

For other linux OS, you can find mariadb-devel at https://pkgs.org/download/mariadb-devel

Upvotes: 3

Peter Kaniu
Peter Kaniu

Reputation: 19

First run the command (take note of python version):

sudo yum install python36-devel

Then install mysqlclient using pip.

Upvotes: 0

Djent
Djent

Reputation: 3467

Ok, found an answer:

yum install mariadb-devel gcc python36u-devel

Upvotes: 28

Related Questions