安装MariaDB:未满足的依赖项,mariadb-server-10.0 [英] Installing MariaDB: unmet dependencies, mariadb-server-10.0

查看:1758
本文介绍了安装MariaDB:未满足的依赖项,mariadb-server-10.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 ubuntu:~$ 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-10.0 (= 10.0.3+maria-1~precise) but it 
                   is not going to be installed
 E: Unable to correct problems, you have held broken packages.

我想进行"sudo apt-get升级",出现以下内容(见下文).我想将MariaDB更新到最新的10.0.3,并在 https://askubuntu.com/a/18694 上阅读,这样更容易使用"sudo aptitude".虽然,我按了错误的键,但它完成了升级并破坏了MariaDB.

I wanted to do a "sudo apt-get upgrade", the following appeared (see below). I wanted to update MariaDB to it's latest 10.0.3 and read on https://askubuntu.com/a/18694 that's it's easier to use "sudo aptitude". Though, I pressed the wrong key, it has done the upgrade and broke MariaDB.

我在Ubuntu 12.04 LTS x64上运行,MariaDB 10.0在错误发生前的最后三个月运行良好

I am on Ubuntu 12.04 LTS x64, MariaDB 10.0 worked fine for the last three months prior to the mistake

我尝试再次安装MariaDB 10,如此处所述: https://downloads.mariadb.org/mariadb/repositories/

I tried to install MariaDB 10 again, as explained there: https://downloads.mariadb.org/mariadb/repositories/

我还尝试了"sudo apt-get purge mysql * mariadb *"并删除了它,但保留了配置文件(如设置屏幕所要求的那样.

I also tried "sudo apt-get purge mysql* mariadb*" and removed it but keeping the config files (as the setup screen asked so.

我的apt sources.list包含在底部:

My apt sources.list contains on the bottom:

 # MariaDB 10.0 repository list - created 2013-07-29 19:06 UTC
 # http://mariadb.org/mariadb/repositories/
 deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main
 deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main

尽管MariaDB 5.5出现了类似的问题: 安装MariaDB-未满足的依赖项,mariadb-server-5.5

Someone had a similar problem though with MariaDB 5.5: Installing MariaDB - Unmet dependencies, mariadb-server-5.5

在错误之前进行登录(尽管如上所述,该错误还是有天赋的):

Log prior to the mistake (did the mistake with aptitude though as stated above):

The following packages have been kept back:
  libmariadbclient18 libmysqlclient18 linux-headers-virtual
  linux-image-virtual linux-virtual mariadb-client-10.0
  mariadb-client-core-10.0 mariadb-server mariadb-server-10.0
  mariadb-server-core-10.0
The following packages will be upgraded:
  apt apt-transport-https apt-utils bind9-host binutils curl dnsutils
  hiphop-php libapt-inst1.4 libapt-pkg4.12 libbind9-80 libcurl3
  libcurl3-gnutls libdns81 libdrm-intel1 libdrm-nouveau1a libdrm-radeon1
  libdrm2 libisc83 libisccc80 libisccfg82 libldap-2.4-2 liblwres80
  libpython2.7 libssl-dev libssl-doc libssl1.0.0 libxml2 libxml2-dev
  linux-firmware linux-libc-dev openssl python python-minimal python2.7
  python2.7-minimal
36 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 54.8 MB of archives.

推荐答案

我通过以下方式解决了该问题:

I solved the issue the following way:

在"/etc/apt/preferences.d/"中创建名为"mariadb"的新文件:

create new file in "/etc/apt/preferences.d/" named "mariadb":

Package: *
Pin: origin ftp.osuosl.org
Pin-Priority: 1000

详细信息: https://kb.askmonty.org/zh/installing-mariadb-deb-files/#pinning-the-mariadb-repository

这确实固定了MariaDB存储库,并赋予它一个高于999优先级的非常高的优先级,这意味着它甚至会降级软件包来安装MariaDB.

This does Pin the MariaDB Repository and gives it a very high priority above 999 priority means it would even downgrade packages to install MariaDB.

原因:

Oracle正在发布MySQL的安全更新,而Ubuntu正在分发版本号高于MariaDB的最新MySQL软件包. MariaDB(这是MySQL的一个分支)以与MySQL相同的名称提供了多个二进制文件.因此,固定MariaDB存储库解决了该问题.

Oracle is issuing security update for MySQL and Ubuntu is distributing very up-to-date MySQL packages with higher version number than MariaDB. And MariaDB (it's a fork of MySQL) provides several binaries under the same name as MySQL. So pinning the MariaDB repository fixed the problem.

感谢官方IRC频道的Jbboin,他向我指出了正确的方向!

这篇关于安装MariaDB:未满足的依赖项,mariadb-server-10.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆