I am building a django app and for which i need to configure mysql.I am trying to install mysqlclient module for sql connection and this is what i am trying
I found this solution at https://github.com/r-dbi/RMySQL/issues/197:
I think this is a bug in that custom MariaDB repo. Their package MariaDB-devel-10.2.6-1.fc25.x86_64 only contains a library named:
/usr/lib64/libmariadbclient.a
However their pkg-config yields another name:
> pkg-config --libs mariadb
-lmariadb
You best raise this at the maintainers of that repo. A workaround is to symlink libmariadbclient.a to libmariadb.a:
sudo ln -s /usr/lib64/libmariadbclient.a /usr/lib64/libmariadb.a
That fixes the installation.
So basically to have mysqlclient install in Python 3.6 and CentOS 7 you need to run:
sudo yum install -y python36-devel mysql-devel gcc
sudo ln -s /usr/lib64/libmariadbclient.a /usr/lib64/libmariadb.a
pip install mysqlclient