32

After I installed Mariadb 10 the Mysql workbench and JPDB client both connect and work fine so next step was get programming with Python (using SQLAlchemy) which seems to require MySQL-python so I went to update that and got: "mysql_config not found" I looked in the "usual places" and did not see a file...

So I followed some ideas from an earlier question on SO and tried to install: apt-get install libmysqlclient-dev

which got me to: The following packages have unmet dependencies: libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.35-0ubuntu0.13.10.2) but 10.0.10+maria-1~saucy is to be installed

which kind of hits a brick wall for me

0

7 Answers 7

39

For Centos 7.0 install the following:

yum install mariadb-devel

For Fedora 23+:

dnf install mariadb-devel
Sign up to request clarification or add additional context in comments.

3 Comments

the question pertains to Ubuntu, not Centos 7.0.
@drs Never the less this answer is useful as this question shows up for generic linux searches
Why does a package by the name mariadb-devel contain mysql development libraries?
35

Found it! The case is that mariadb has a compatible package, if you have the ppa setup as in http://downloads.mariadb.org/. Just

sudo apt-get install libmariadbclient-dev

Thanks to http://data-matters.blogspot.com/2013/08/install-mysql-python-with-mariadb.html After this the mysql-python installs correctly

3 Comments

This is a solution to install libraries depend on mysql-dev on ubuntu. Thanks.
You can also just install 'libmariadbclient-dev' from Ubuntu, without the need for the custom ppa.
Worked for Ubuntu 18.04, however for Mac Mojave I had to do brew install mysql-connector-c
22

There's NO solution on Ubuntu 16.04

Doing:

sudo ln -s /usr/bin/mariadb_config /usr/bin/mysql_config

Worked for me.

2 Comments

Best answer for Ubuntu 16.04 !
This fixed the same issue on debian buster
9

Install the following library:

sudo apt-get install libmariadb-client-lgpl-dev  

And create a symbolic link named mysql_config:

ln -s /usr/bin/mariadb_config /usr/bin/mysql_config

1 Comment

This was it. Something is rotten in the state of ubuntu 16
7

For Debian/Ubuntu PPA from https://downloads.mariadb.org/mariadb/repositories/

for MariaDB 10.1: apt-get install libmariadbclient-dev
for MariaDB 10.2: apt-get install libmariadb-dev
for MariaDB 10.3: apt-get install libmariadb-dev-compat

Comments

3

On Ubuntu 17.04 the following worked for me

sudo apt-get install default-libmysqlclient-dev

1 Comment

Worked for me on debian as well
2

For Debian Jessie:

sudo apt-get install libmariadb-client-lgpl-dev 
sudo ln -s /usr/bin/mariadb_config /usr/bin/mysql_config

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.