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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With