我正在尝试使用 Ubuntu 14.10 在我的笔记本电脑上安装 MariaDB。每次我遇到错误。所以,问题是 MariaDB 需要 libmysqlclient18 版本 10.0.16 但安装了 5.xx。如果我安装 10.0.16,我会收到另一个应用程序需要 libmysqlclient18 以前版本的新错误。我已尝试执行MariaDB 安装指南页面上的步骤,但没有帮助。或者也许我做错了什么。
ant@ubuntupc:~$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmariadbclient18 : Depends: libmysqlclient18 (= 10.0.16+maria-1~utopic) but 5.5.41-0ubuntu0.14.10.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
ant@ubuntupc:~$ sudo apt-get install libmysqlclient18=10.0.16+maria-1~utopic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
aptitude-common aptitude-doc-en cabextract intltool libaio1 libcwidget3
libdbd-mysql-perl libdbi-perl libunique-3.0-0 libxml-parser-perl
linux-headers-3.16.0-23 linux-headers-3.16.0-23-generic
linux-image-3.16.0-23-generic linux-image-extra-3.16.0-23-generic
mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0
mariadb-server-core-10.0
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
libmysqlclient18
1 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2 948 B of archives.
After this operation, 3 478 kB disk space will be freed.
dpkg: error processing archive /var/cache/apt/archives/libmysqlclient18_10.0.16+maria-1~utopic_amd64.deb (--unpack):
libmysqlclient18:amd64 10.0.16+maria-1~utopic (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances
Errors were encountered while processing:
/var/cache/apt/archives/libmysqlclient18_10.0.16+maria-1~utopic_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ant@ubuntupc:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
aptitude-common aptitude-doc-en cabextract intltool libaio1 libcwidget3
libdbd-mysql-perl libdbi-perl libunique-3.0-0 libxml-parser-perl
linux-headers-3.16.0-23 linux-headers-3.16.0-23-generic
linux-image-3.16.0-23-generic linux-image-extra-3.16.0-23-generic
mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0
mariadb-server-core-10.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libmysqlclient18
The following packages will be upgraded:
libmysqlclient18
1 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2 948 B of archives.
After this operation, 3 478 kB disk space will be freed.
Do you want to continue? [Д/н] y
dpkg: error processing archive /var/cache/apt/archives/libmysqlclient18_10.0.16+maria-1~utopic_amd64.deb (--unpack):
libmysqlclient18:amd64 10.0.16+maria-1~utopic (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances
Errors were encountered while processing:
/var/cache/apt/archives/libmysqlclient18_10.0.16+maria-1~utopic_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ant@ubuntupc:~$
看来您有来自另一个应用程序使用的 mysql-client 库的工件。我建议做
这将显示已安装的 libmysql 版本,您可以尝试使用 apt 将其一一删除。您安装的应用程序之一可能依赖于所述版本并在此过程中强行删除自身。
似乎我找到了解决方案。我像典型的 Windows 用户一样修复了它:-) 只是删除了所有 mysql 和 mariadb 包,然后安装了 mariadb。
首先,彻底摆脱两个冲突的客户:
然后再次尝试 mariadb 安装。它现在应该工作了。
最后,
看到一切都恢复正常。
取自 http://mikelfox.com/mysql/problems-installing-mariadb-5-5-10-1-on-ubuntu-12-13-14-04-etc/