安装 MariaDB - 未满足的依赖项,依赖:mariadb-server-10.0

安装 MariaDB - 未满足的依赖项,依赖:mariadb-server-10.0

所以我决定从 MYSQL 服务器升级到 Mariadb。我认为卸载 mysql 服务器并安装 mariadb 应该很快。

当我尝试通过命令安装时:sudo apt-get install python-software-properties

其次是:sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

其次是:

sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main'

进而:sudo apt-get update

最后:sudo apt-get install mariadb-server

我收到一个错误:

`invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (= 10.1.16+maria-1~trusty); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server

我尝试过清除 mariadb 以恢复到 mysql 服务器,但也无法安装。尝试了网上的几个修复方法,但都无法修复。问题可能出在哪里?有人知道吗?相信我,我已经在 Google 上搜索过,也尝试了很多修复方法,但都不起作用?

/etc/apt/sources.list的如下

# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
#deb http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu trusty main
#deb-src http://mirror.jmu.edu/pub/mariadb/repo/10.1/ubuntu trusty main
deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main

答案1

您正在使用 Ubuntu 14.04 (trusty) 并且已添加 Ubuntu 12.04 (precise) 的存储库?

deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main

如果我在 packages.ubuntu.com 上搜索 mariadb,会发现 trusty universe 存储库中已经有 mariadb - 请参阅此关联

你能删除吗http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/etc/apt/sources.list 中的存储库,并检查 /etc/apt/sources.list.d 中是否有一些奇怪的存储库?

清除以前的 mariadb 安装后,尝试使用以下方法安装

sudo apt-get update
sudo apt-get install mariadb-server

这将安装 maria db 5.5。如果您需要版本 10.1,请尝试使用官方说明这里

答案2

处理未满足的依赖关系的最简单方法是使用 Synaptic 包管理器。0

] 如果尚未安装,请安装它。链接:
1] 单击设置>过滤器。转到损坏并检查不可安装和损坏。2
] 使用损坏的自定义过滤器来过滤错误中提到的包。3
] 右键单击​​ > 标记为完全删除。4
] 单击顶部栏上的应用。

这应该可以解决问题。:)

答案3

有点晚了,但昨晚在 Linux Mint 17.2 -Rafaela 上将 MariaDB 升级到 10.1 稳定版后也遇到了同样的问题。

因此,卸载 + 清除 MariaDB 后,按照 Mint 17.1 说明安装了 10.0 稳定版本,没有问题。

官方说明MariaDB 下载发行版

相关内容