gpt4 book ai didi

ubuntu - 安装 MariaDB - 未满足的依赖项,mariadb-server-5.5

转载 作者:太空宇宙 更新时间:2023-11-03 16:41:20 27 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 12.04 LTS 上安装 MariaDB。

我已按照 https://askubuntu.com/questions/64772/how-to-install-mariadb 提供的说明进行操作以及选择下载时出现的来自 MariaDB.org 的信息。

最后一步是 sudo apt-get install mariadb-server 返回:

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:
mariadb-server : Depends: mariadb-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

依赖性问题是一个确认问题 (https://mariadb.atlassian.net/browse/MDEV-3882),但我相信损坏的包会阻止我解决这个问题。

如果我尝试安装 libmariadbclient18,我会得到以下信息:

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:
libmariadbclient18 : Depends: libmysqlclient18 (= 5.5.30-mariadb1~precise) but 5.5.31-0ubuntu0.12.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

我尝试使用 sudo apt-get install -f 修复损坏的包,但我仍然无法安装 mariadb-server 或 libmariadbclient18。

最佳答案

sudo apt-get install libmysqlclient18=5.5.30-mariadb1~precise mysql-common=5.5.30-mariadb1~precise
sudo apt-get install mariadb-server

第一个将 ubuntu 端的两个 mysql 库还原为较旧的 mariadb 库。第二个可以正常进行。

软件包被删除是因为运行了类似 apt-get dist-upgrade 的东西。 GUI 实际上会警告您出现问题。

为防止此问题再次出现,请告诉 apt favor the MariaDB repo via pinning通过在 /etc/apt/preferences.d 中创建一个文件:

$ cat /etc/apt/preferences.d/MariaDB.pref
Package: *
Pin: origin <mirror-domain>
Pin-Priority: 1000

此外,如果您需要编译任何东西(如 Ruby gems),请务必安装 libmariadbclient-dev

关于ubuntu - 安装 MariaDB - 未满足的依赖项,mariadb-server-5.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16214517/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com