当前位置: 首页>>技术教程>>正文


apt – dpkg: invoke-rc.d: initscript mysql, action “start” 失败

, ,

问题描述

我在这里阅读了很多帖子,它们都声明要运行以下命令:

  1. Apt-get -f 删除 **

  2. apt-get更新

  3. apt-get升级

  4. apt-get -f 安装**

我已经以各种顺序看到了这些,但没有一个能解决我的问题。无论我尝试什么,我都会得到:

 apt-get -f install mysql-server                              Reading package 
lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
tinyca mailx
The following NEW packages will be installed:
mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/14.9 MB of archives.
After this operation, 53.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously unselected package mysql-server-core-5.5.
(Reading database ... 83134 files and directories currently installed.)
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.29-
0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-server-5.5.
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb) 
...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.29-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ...
invoke-rc.d: initscript mysql, action "start" failed.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
No apport report written because the error message indicates its a followup error from a 
No apport report written because the error message indicates its a followup error from a 
previous failure.
                   Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

在过去的一周里,我尝试了几件事,但无法解决这个问题,如有任何帮助,我们将不胜感激。我确实注意到消息:

包 mysql-server-5.5 尚未配置。

我还没有配置好这个,所以我正在处理这方面的问题。任何其他帮助将不胜感激。

最佳方案

Titanicx 的解决方案对我有用。然

dpkg -S etc/mysql

看到 mysql-common 是问题所在。完全删除 MySQL:

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

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/13339.html,未经允许,请勿转载。