首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装服务器未满足的依赖项,MariaDB -mariadb-5.5

安装服务器未满足的依赖项,MariaDB -mariadb-5.5
EN

Stack Overflow用户
提问于 2013-04-25 20:16:49
回答 7查看 32K关注 0票数 29

我正在尝试在Ubuntu12.04LTS上安装MariaDB。

我已经按照https://askubuntu.com/questions/64772/how-to-install-mariadb和MariaDB.org提供的说明进行了操作,当您选择下载时,这些说明就会出现。

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

代码语言:javascript
复制
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,我会得到以下结果:

代码语言:javascript
复制
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。

EN

回答 7

Stack Overflow用户

回答已采纳

发布于 2013-04-26 17:04:52

代码语言:javascript
复制
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实际上会警告您有些地方不对劲。

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

代码语言:javascript
复制
$ cat /etc/apt/preferences.d/MariaDB.pref
Package: *
Pin: origin <mirror-domain>
Pin-Priority: 1000

另外,如果你需要编译任何东西(比如Ruby ),一定要安装libmariadbclient-dev

票数 34
EN

Stack Overflow用户

发布于 2013-04-29 02:07:20

我做了类似@Lloeki的事情

代码语言:javascript
复制
$ sudo apt-get purge libmariadbclient18 mariadb-server mariadb-client-5.5 libmysqlclient18 mysql-common```

然后查找要安装的候选程序并重新安装:

代码语言:javascript
复制
$ apt-cache policy libmysqlclient18 | grep -i quantal 
Installed: 5.5.30-mariadb1~quantal
*** 5.5.30-mariadb1~quantal 0
    500 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ quantal/main amd64 Packages
$ apt-cache policy mysql-common | grep -i quantal 
Installed: 5.5.30-mariadb1~quantal
*** 5.5.30-mariadb1~quantal 0
    500 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ quantal/main amd64 Packages
$ 
代码语言:javascript
复制
$ sudo apt-get install libmysqlclient18=5.5.30-mariadb1~quantal mysql-common=5.5.30-mariadb1~quantal mariadb-server mariadb-client

...
 * Stopping MariaDB database server mysqld                                                              [ OK ] 
130428 13:19:40 [Note] Plugin 'InnoDB' is disabled.
130428 13:19:40 [Note] Plugin 'FEEDBACK' is disabled.

我收到了插件被禁用的警告,但是在用sudo service mysql restart重启mysql并安装我的sql时,show create table mytable看起来没问题,而且ENGINE=InnoDB DEFAULT CHARSET=utf8也像预期的那样显示。

票数 9
EN

Stack Overflow用户

发布于 2013-05-03 01:23:32

@yuvilio说得很对:

$ sudo apt-get install libmysqlclient18=5.5.30-mariadb1~quantal mysql-common=5.5.30-mariadb1~quantal mariadb-server mariadb-client

这适用于12.04、12.10和13.04 (也适用于LinuxMint 14)。

显然,MariaDB对内核更新过的任何地方都很“敏感”,比如3.5.0-25,这似乎会影响使用简单的"sudo apt-get install MariaDB -mariadb“安装的服务器。

@yuvilio提到,插件' InnoDB‘和'FEEDBACK’被禁用,但InnoDB在安装后可以正常工作。

这是非常合理的,因为MariaDB使用XTRA-DB作为InnoDB的替代。大概MariaDB也有一个新的反馈模块(他们希望MariaDB反馈到mariadb.org,而不是Oracle/mySQL)

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16214517

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档