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

Cou*_*les 27 ubuntu apt-get mariadb

我正在尝试在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.
Run Code Online (Sandbox Code Playgroud)

依赖性问题是一个确认问题(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.
Run Code Online (Sandbox Code Playgroud)

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

Llo*_*eki 34

sudo apt-get install libmysqlclient18=5.5.30-mariadb1~precise mysql-common=5.5.30-mariadb1~precise
sudo apt-get install mariadb-server
Run Code Online (Sandbox Code Playgroud)

第一个将ubuntu端的两个mysql库恢复为较旧的mariadb.然后第二个可以正常进行.

软件包被删除了,因为apt-get dist-upgrade运行了类似的东西 GUI实际上警告你有些不对劲.

要防止此问题再次出现,请通过/etc/apt/preferences.d以下位置创建文件来固定支持MariaDB repo:

$ cat /etc/apt/preferences.d/MariaDB.pref
Package: *
Pin: origin <mirror-domain>
Pin-Priority: 1000
Run Code Online (Sandbox Code Playgroud)

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


yuv*_*lio 9

我做了类似于@Lloeki的事情

$ sudo apt-get purge libmariadbclient18 mariadb-server mariadb-client-5.5 libmysqlclient18 mysql-common```
Run Code Online (Sandbox Code Playgroud)

然后查找候选人安装并重新安装它:

$ 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
$ 
Run Code Online (Sandbox Code Playgroud)
$ 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.
Run Code Online (Sandbox Code Playgroud)

我得到了插件禁用警告但在重新启动mysql sudo service mysql restart并安装我的sql后,innodb看起来很好并且正如预期的那样show create table mytable显示ENGINE=InnoDB DEFAULT CHARSET=utf8.