Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libmariadbclient-dev install error: Depends: libmariadbclient18

I'm trying to install mysqclient, but I'm getting an error when trying 'apt-get install libmariadbclient-dev' in Ubuntu 18.04 LTS with Python 3.7.0.

How can I make this work? Thanks.

sudo apt-get install libmariadbclient-dev
Reading package lists... Done   
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libmariadbclient-dev : Depends: libmariadbclient18 (= 1:10.1.29-6) but 1:10.3.7+maria~bionic is to be installed
E: Unable to correct problems, you have held broken packages.
like image 233
freeAR Avatar asked Jun 30 '18 01:06

freeAR


2 Answers

Installing an older version, works:

sudo apt-get install libmariadbclient18=1:10.1.29-6
sudo apt-get install libmariadbclient18-dev=1:10.1.29-6
pip3.7 install mysqlclient

Update 07/12/2018: Today, I installed MariaDB 10.3.8 as shown below (in a clean system) and libmariadbclient18 installed without complaining:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt install mariadb-server
sudo apt install mariadb-client
sudo apt install libmariadb-dev
sudo apt install libmariadb-dev-compat
sudo apt-get install libmariadbclient18

I don't know whether having installed libmariadb-dv and libmariadv-dev-compat helped.

like image 97
freeAR Avatar answered Nov 12 '22 20:11

freeAR


I also needed the package libmariadbclient-dev (or sometimes libmysqlclient-dev) in the past, otherwise the Python pip package mysqlclient wouldn't install.

Then I ran into this error too. And I tried installing libmariadb-dev instead, and that worked. pip install mysqlclient works with this package too for me.

Hope that helps anyone.

like image 1
gitaarik Avatar answered Nov 12 '22 20:11

gitaarik