MySQL 安装错误:libmariadbclient-dev 与 libmysqlclient-dev 冲突

MySQL 安装错误:libmariadbclient-dev 与 libmysqlclient-dev 冲突

我正在尝试在 Ubuntu 17.10 笔记本电脑中安装 mysql-server_5.7.21-1ubuntu17.10_amd64.deb-bundle。我遇到了以下错误,

dpkg: regarding libmysqlclient-dev_5.7.21-1ubuntu17.10_amd64.deb containing libmysqlclient-dev:
 libmariadbclient-dev conflicts with libmysqlclient-dev
  libmysqlclient-dev (version 5.7.21-1ubuntu17.10) is to be installed.

dpkg: error processing archive libmysqlclient-dev_5.7.21-1ubuntu17.10_amd64.deb (--install):
 conflicting packages - not installing libmysqlclient-dev

完整的终端输出如下,

/Downloads$ cd mysql-server_5.7.21-1ubuntu17.10_amd64.deb-bundle/
user@laptop:~/Downloads/mysql-server_5.7.21-1ubuntu17.10_amd64.deb-bundle$ sudo dpkg -i *.deb
(Reading database ... 384833 files and directories currently installed.)
Preparing to unpack libmysqlclient20_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.21-1ubuntu17.10) over (5.7.21-1ubuntu17.10) ...
dpkg: regarding libmysqlclient-dev_5.7.21-1ubuntu17.10_amd64.deb containing libmysqlclient-dev:
 libmariadbclient-dev conflicts with libmysqlclient-dev
  libmysqlclient-dev (version 5.7.21-1ubuntu17.10) is to be installed.

dpkg: error processing archive libmysqlclient-dev_5.7.21-1ubuntu17.10_amd64.deb (--install):
 conflicting packages - not installing libmysqlclient-dev
Selecting previously unselected package libmysqld-dev.
Preparing to unpack libmysqld-dev_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking libmysqld-dev (5.7.21-1ubuntu17.10) ...
Replaced by files in installed package libmariadbd-dev:amd64 (10.1.30-0ubuntu0.17.10.1) ...
Preparing to unpack mysql-client_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-client (5.7.21-1ubuntu17.10) over (5.7.21-1ubuntu17.10) ...
dpkg: warning: downgrading mysql-common from 5.8+1.0.2ubuntu1 to 5.7.21-1ubuntu17.10
Preparing to unpack mysql-common_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-common (5.7.21-1ubuntu17.10) over (5.8+1.0.2ubuntu1) ...
Preparing to unpack mysql-community-client_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-community-client (5.7.21-1ubuntu17.10) over (5.7.21-1ubuntu17.10) ...
Preparing to unpack mysql-community-server_5.7.21-1ubuntu17.10_amd64.deb ...
.
Unpacking mysql-community-server (5.7.21-1ubuntu17.10) over (5.7.21-1ubuntu17.10) ...
Preparing to unpack mysql-community-source_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-community-source (5.7.21-1ubuntu17.10) over (5.7.21-1ubuntu17.10) ...
Selecting previously unselected package mysql-community-test.
Preparing to unpack mysql-community-test_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-community-test (5.7.21-1ubuntu17.10) ...
Preparing to unpack mysql-server_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-server (5.7.21-1ubuntu17.10) over (5.7.21-1ubuntu17.10) ...
Selecting previously unselected package mysql-testsuite.
Preparing to unpack mysql-testsuite_5.7.21-1ubuntu17.10_amd64.deb ...
Unpacking mysql-testsuite (5.7.21-1ubuntu17.10) ...
dpkg: dependency problems prevent configuration of libmysqld-dev:
 libmysqld-dev depends on libmysqlclient-dev (= 5.7.21-1ubuntu17.10); however:
  Package libmysqlclient-dev is not installed.
 libmariadbd18:amd64 (10.1.30-0ubuntu0.17.10.1) breaks libmysqld-dev and is installed.
 libmariadbd-dev:amd64 (10.1.30-0ubuntu0.17.10.1) breaks libmysqld-dev and is installed.

dpkg: error processing package libmysqld-dev (--install):
 dependency problems - leaving unconfigured
Setting up mysql-common (5.7.21-1ubuntu17.10) ...
Installing new version of config file /etc/mysql/conf.d/mysql.cnf ...
Installing new version of config file /etc/mysql/my.cnf.fallback ...
Setting up mysql-community-client (5.7.21-1ubuntu17.10) ...
Setting up mysql-community-source (5.7.21-1ubuntu17.10) ...
dpkg: dependency problems prevent configuration of mysql-community-test:
 mysql-community-test depends on libmysqlclient-dev; however:
  Package libmysqlclient-dev is not installed.

dpkg: error processing package mysql-community-test (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-testsuite:
 mysql-testsuite depends on mysql-community-test (= 5.7.21-1ubuntu17.10); however:
  Package mysql-community-test is not configured yet.

dpkg: error processing package mysql-testsuite (--install):
 dependency problems - leaving unconfigured
Setting up libmysqlclient20:amd64 (5.7.21-1ubuntu17.10) ...
Setting up mysql-client (5.7.21-1ubuntu17.10) ...
Setting up mysql-community-server (5.7.21-1ubuntu17.10) ...
Setting up mysql-server (5.7.21-1ubuntu17.10) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for systemd (234-2ubuntu12.3) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Errors were encountered while processing:
 libmysqlclient-dev_5.7.21-1ubuntu17.10_amd64.deb
 libmysqld-dev
 mysql-community-test
 mysql-testsuite

这里有人可以指出我做错了什么吗?

相关内容