Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I am not able to fix broken packages to my ubuntu machine. I followed many command posted on forums. Nothing happened!

The packages that have the problem are:


Any way to resolve it? The configuration of my PC is in Greek language and I can't give you some useful output since this problem prevents me from changing the language of console! Thank you!

Ok, here is the output!

 unknown@unknown-pc:~$  sudo apt-get install --reinstall mysql-server-5.5 mysql-server-5.5 
 [sudo] password for unknown: 
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Suggested packages:
 tinyca mailx
 The following packages will be upgraded:
 1 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
 2 not fully installed or removed.
 Need to get 0 B/8746 kB of archives.
 After this operation, 0 B of additional disk space will be used.
 Preconfiguring packages ...
 (Reading database ... 366372 files and directories currently installed.)
 Preparing to replace mysql-server-5.5 5.5.31-0ubuntu0.12.04.1 (using .../mysqlserver-5.5_5.5.31-0ubuntu0.12.04.2_i386.deb) ...
 invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
 dpkg: warning: subprocess old pre-removal script returned error exit status 100
 dpkg - trying script from the new package instead ...
 invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
 dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.31-0ubuntu0.12.04.2_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 100
 No apport report written because MaxReports is reached already
                                                          invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
 invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
 dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 100
 Errors were encountered while processing:
 E: Sub-process /usr/bin/dpkg returned an error code (1)


share|improve this question
you can re-install mysql-server, maybe, problem will be resolved. – Ziyaddin Sadigov Jun 8 '13 at 10:41
How to do this? – Vagelism22678 Jun 8 '13 at 10:49
Could you please add the error message to your question? You can change the output of Terminal to English by running this command (without quotes): "LC_ALL=C bash". – papukaija Jun 8 '13 at 10:57
You can reinstall a package by running sudo apt-get install --reinstall mysql-server-5.5 mysql-server – papukaija Jun 8 '13 at 11:02
sudo apt-get install mysql-server mysql-common mysql-client – Ziyaddin Sadigov Jun 8 '13 at 11:07

Somehow your package system got screwed. Apparently the file /etc/init.d/mysql has been lost in the progress. Add a dummy in order to aid the package system over the loss:

$ sudo -i
# cat > /etc/init.d/mysql << EOF
> #!/bin/true
# chmod 755 /etc/init.d/mysql

... and then remove all mysql packages ...

# apt-get remove --purge mysql-server-5.5 mysql-server

That should also remove the dummy script. If not, delete it manually. After that you should be able to install mysql as normal again.

share|improve this answer

You should be able to fix broken packages by running the command below from Terminal:

sudo apt-get -f install
share|improve this answer
This command I tried many times! No result! – Vagelism22678 Jun 8 '13 at 10:48
You could also try running sudo dpkg-reconfigure mysql-server-5.5 mysql-server – papukaija Jun 8 '13 at 10:59
Did that and dont work! I got many errors, Thank you! – Vagelism22678 Jun 8 '13 at 11:15

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.