在 Ubuntu 14.04 上安装 mariadb 10 时出错

在 Ubuntu 14.04 上安装 mariadb 10 时出错

当我尝试安装玛丽亚数据库在 Ubuntu 14.04 上,显示:

dpkg: error processing archive 
/var/cache/apt/archives/libmysqlclient18_10.0.14+maria-1~trusty_amd64.deb (--unpack):  
libmysqlclient18:amd64 10.0.14+maria-1~trusty 
(Multi-Arch: no) is not co-installable
with libmysqlclient18 which has multiple installed instances 
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试了很多方法来解决它,但没有人解决它。

答案1

来自 mariadb 文档中的评论

要修复“libmysqlclient18:amd64 5.5.34+maria-1~saucy (Multi-Arch: no) 不能与已安装多个实例的 libmysqlclient18 共同安装”问题,请按照以下步骤操作:

问题是 libmysqlclient18:i386 未被自动安装完全删除。我的解决方案不是“弄乱”/var/lib/dpkg/status,而是:

  • 完全删除libmariadbclient18(因为它依赖于 libmysqlclient18)apt-get --purge remove libmariadbclient18

  • 完全libmysqlclient18:i386去除apt-get --purge remove libmysqlclient18:i386

然后继续自动安装软件更新(或libmariadbclient18libmysqlclient18 5.5.34+maria-1saucy终端安装)

答案2

对于那些在 Ubuntu 14.10 中从 MySQL 升级到 Maria DB 的人来说,我会在 Google 搜索中找到这个答案。我在 14.10 中也会遇到类似的问题

 libmysqlclient18:amd64 10.0.16+maria-1~utopic (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances

按照这些建议都无济于事后,下面的建议对我帮助很大:如何在 Ubuntu Server 中用 MariaDB 替换 MySQL作者:JournalXtra。

编辑 /var/lib/dpkg/status 并删除 libmysqlclient18 的两个实例,如下所示:

Package: libmysqlclient18
Status: deinstall ok config-files
Priority: optional
Section: libs
Installed-Size: 3392
Maintainer: Ubuntu Developers <[email protected]>
Architecture: i386
Multi-Arch: same
Source: mysql-5.5
Version: 5.5.40-0ubuntu1
Config-Version: 5.5.40-0ubuntu1
Depends: mysql-common (>= 5.5.40-0ubuntu1), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), zlib1g (>= 1:1.1.4)
Pre-Depends: multiarch-support
Description: MySQL database client library
 MySQL is a fast, stable and true multi-user, multi-threaded SQL database
 server. SQL (Structured Query Language) is the most popular database query
 language in the world. The main goals of MySQL are speed, robustness and
 ease of use.
 .      
 This package includes the client library.
Homepage: http://dev.mysql.com/
Original-Maintainer: Debian MySQL Maintainers <[email protected]>

让我之后能够顺利安装MariaDB。

sudo apt-get install mariadb-server

笔记:我尝试了很多次,删除了 libmariadbclient18 和 libmysqlclient18,然后这个解决方案才奏效。我无法解决 apt-get 问题,直到删除了这两个,因为在我尝试任何其他修复之前,它们被报告为损坏的软件包。

答案3

这个对我有用。

sudo dpkg --purge libmysqlclient18  
sudo dpkg --purge libmysqlclient18:i386
sudo apt install -f

相关内容