我试图在Ubuntu 12.04 LTS上安装MariaDB。
我按照http://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。
第一个将ubuntu一边的两个MysqL库恢复到旧的mariadb。然后第二个可以正常进行。
软件包被删除,因为像apt-get dist-upgrade一样运行。 GUI实际上警告你,有些事情是不幸的。
为了防止这个问题再次出现,请通过在/etc/apt/preferences.d中创建一个文件来告诉favor the MariaDB repo via pinning:
- $ cat /etc/apt/preferences.d/MariaDB.pref
- Package: *
- Pin: origin <mirror-domain>
- Pin-Priority: 1000
另外,如果需要编译任何东西(如Ruby gems),请确保安装libmariadbclient-dev。