微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我正在尝试安装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 @R_760_4045@ion... 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 @R_760_4045@ion 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.

解决方法:

安装旧版本,有效:

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

更新07/12/2018:
今天,我安装了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.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐