Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
root@administrator-desktop:/etc/mysql# sudo apt-get remove php5-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-mysql is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.1 (5.1.37-1ubuntu5.5) ...
invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
the process get hanged here.
dpkg: error processing mysql-server-5.1 (--configure):
 subprocess installed post-installation script killed by signal (Interrupt)
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.1; however:
  Package mysql-server-5.1 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:
E: Sub-process /usr/bin/dpkg returned an error code (1)

please help what is the issues. I am facing this in too many places

share|improve this question

migrated from Jul 13 '11 at 16:53

This question came from our site for professional and enthusiast programmers.

The problem there is that there seems to be a broken install of the package mysql-server-5.1.

Try using

dpkg -r mysql-server-5.1
apt-get install mysql-server-5.1

To remove and reinstall. If dpkg refuses to remove, try adding --force flag (and see dpkg --force-help for more help)

share|improve this answer

Try creating a file /etc/init.d/mysql

touch /etc/init.d/mysql

And now remove the mysql-server-5.1

Then you can reinstall it.

Blog :

share|improve this answer
I know this is kind of late but, I had a similar problem. The following line tells the problem: ...invoke-rc.d: unknown initscript, /etc/init.d/mysql not found... I did what Mr. Gardeniers said: "touch /etc/init.d/mysql" afterwards I was able to remove/reinstall the package. -J – user169745 Apr 16 '13 at 11:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.