无法安装MariaDB-依赖性错误?


8

我在Digital Ocean VM上运行Ubuntu 14.04。我正在尝试安装MariaDB 10.1。这样做时,出现以下错误:

Setting up mariadb-server-10.1 (10.1.8+maria-1~trusty) ...
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.8+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
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是我尝试解决的问题:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server

重新启动机器

我搜索Stack Exchange和其他Linux表格已有一段时间,但我不知道是什么原因造成的。感谢您提供的任何帮助!

更新:这是输出apt-get install -f

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mariadb-server-10.1 (10.1.8+maria-1~trusty) ...
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (= 10.1.8+maria-1~trusty); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行sudo apt-get install -f并发布输出。
迈克尔·汉普顿

@MichaelHampton我将信息粘贴在更新的问题中。我之前看过输出,它不是很有用。
Zach Russell

您是否找到了解决方案?
jannej

为什么这个问题仍然在serverfault上还是没有关闭?
罗布

Answers:


4

在日志中找到了这个:

[ERROR] /usr/sbin/mysqld: unknown variable log_slow_queries=/var/log/mysql/mysql-slow.log'

所以我注释掉conf.d / local.cnf

#log_slow_queries=/var/log/mysql/mysql-slow.log'

最终安装成功结束。


非常感谢,正是这样,阻止了我从jessie升级到拉伸
xXx

这也是我的原因。
КонстантинРекунов

2

尝试备份/ var / lib / mysql中的所有文件。全部删除它们,然后执行mysql_install_db。

我的问题来自删除mysqld并将其替换为mariadb并尝试保留数据库文件。其他所有方法对我来说都失败了。


1

您的系统在运行mariadb-server-10.1软件包的(后)配置脚本时遇到问题。

首先,尝试使用清理apt缓存apt-get clean并重新安装该软件包(请注意apt-get autoclean仅部分清理缓存)。

如果失败,则必须使用dpkg -i mariadb-server-10.1和/或dpkg-reconfigure mariadb-server-10.1更深入地查看特定错误。


1
sudo shutdown -r now

我知道重启计算机解决了Linux上的问题听起来很疯狂,但是我仔细检查了一下。但是我在Vagrant机器上工作,不确定Digital Ocean。

系统:

  • Debian 7
  • 从dotdeb安装的mysql具有正常工作的数据库,
  • 更新了MariaDB apt源并添加了密钥,
  • 安装mariadb-server-10.1,并以相同的错误结束。

重新启动后,所有工作均正常进行,包括现在由MariaDB服务的数据库。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.