我正在尝试在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.
依赖性问题是一个确认问题(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 .
8 回答
第一个将ubuntu端的两个mysql库恢复为较旧的mariadb . 然后第二个可以正常进行 .
由于
apt-get dist-upgrade
之类的东西被运行,因此删除了包 . GUI实际上警告你有些不对劲 .要防止此问题再次出现,请通过在
/etc/apt/preferences.d
中创建文件告诉apt到favor the MariaDB repo via pinning:另外,如果需要编译任何东西(比如Ruby gems),请务必安装
libmariadbclient-dev
.我做了类似于@Lloeki的事情
然后查找候选人安装并重新安装它:
我得到了插件禁用警告但在用
sudo service mysql restart
重新启动mysql并安装我的sql时,innodb看起来很好并且show create table mytable
正如预期的那样显示ENGINE=InnoDB DEFAULT CHARSET=utf8
.@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,这似乎会影响MariaDB的安装,使用简单的“sudo apt-get install mariadb-server”
@yuvilio提到插件'InnoDB'和'FEEDBACK'被禁用,但InnoDB在安装后工作 .
这非常有意义,因为MariaDB使用XTRA-DB作为InnoDB的替代品 . 据推测MariaDB还有一个新的反馈模块(他们希望MariaDB反馈转到mariadb.org而不是Oracle / mySQL)
@Lloeki的答案对我不起作用,因为我提到的版本不可用,导致出现此错误:
要解决此问题,您需要找到正确的版本:
您可以使用
aptitude versions libmysqlclient18
获取可用版本的列表 . 对于我的系统,这看起来像:(还有几行,但只显示了相关的行) .
带
i
的行是当前安装的版本,并且建议的5.5.30-mariadb1~precise
没有行 . 然而,另一位候选人看起来很有希望 . 请注意,就像我一样,这对你来说不一定(随着时间的推移而变化) .在此示例中,您可以继续这样:
然后安装将选择客户端和
mariadb-common
,您可以继续:没有OP的错误 .
尝试
让我分享一下我在案件中的解决方法( Ubuntu 14.04 ) .
我有 error :
Solution:
第1步:
sudo apt-get install libmysqlclient18
第2步:
sudo apt-get install mariadb-server
Notes:
我正按照这些安装instructions
我以前没有安装MySQL
我不知道这是否对任何人都有帮助,但我在安装mariadb 10时遇到了麻烦并且出现了导致我访问此页面的错误,但我没有尝试过任何帮助 .
我终于意识到我的/ tmp目录是由root拥有的,其他用户无法写入它 . 我解决了这个问题然后做了:
尝试再次安装,但删除失败,所以我删除
/var/lib/mysql
然后尝试:再次,它实际上安装了mariadb服务器并启动并运行...
它现在有效 .
通过删除所有运行的mysql包,我能够安装mariadb:
我不确定是否首先删除mysql .