libmariadbclient-dev安装错误:取决于:libmariadbclient18

时间:2018-06-30 01:21:54

标签: mysql python-3.x mariadb

我正在尝试安装mysqclient,但是在具有Python 3.7.0的Ubuntu 18.04 LTS中尝试“ apt-get install libmariadbclient-dev”时出现错误。

我该如何进行这项工作?谢谢。

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.

1 个答案:

答案 0 :(得分:4)

安装较旧的版本有效:

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

2018年7月12日更新: 今天,我按如下所示(在干净的系统中)安装了MariaDB 10.3.8,并毫无抱怨地安装了libmariadbclient18:

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

我不知道安装libmariadb-dv和libmariadv-dev-compat是否有帮助。

相关问题