dpkg: error processing mysql-server (--configure): dependency problems - leaving unconfigured

惭愧啊,在ubuntu11.10中,安装mysql5.5时,遇到奇葩 的问题,花费了不止3个小时。网上查看了很多资料众说纷纭,一一尝试却没有解决什么问题,在几近绝望的时候,看到如下这篇文章,解决了燃眉之急。


转自:http://hi.baidu.com/tysonabc/item/691008ccadba5346a8ba944f

dpkg: error processing mysql-server (--configure): dependency problems - leaving unconfigured

start: Job failed to start

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):

 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:

 mysql-server-5.5

 mysql-server

E: Sub-process /usr/bin/dpkg returned an error code (1)



解决方法:

删除mysql前 先删除一下 /var/lib/mysql 还有 /etc/mysql



sudo rm /var/lib/mysql/ -R

sudo rm /etc/mysql/ -R


sudo apt-get autoremove mysql* --purge

sudo apt-get remove apparmor


sudo apt-get install mysql-server mysql-common


你可能感兴趣的:(dpkg: error processing mysql-server (--configure): dependency problems - leaving unconfigured)