Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This has been happening for a few weeks. Every other package upgrades without issue except this one, but I'm not sure what's causing this or how to debug it.

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  percona-server-server-5.5
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/22.1 MB of archives.
After this operation, 845 kB disk space will be freed.
Do you want to continue [Y/n]? 

Preconfiguring packages ...


(Reading database ... 684209 files and directories currently installed.)
Preparing to replace percona-server-server-5.5 5.5.30-rel30.1-465.precise (using .../percona-server-server-5.5_1%3a5.5.30-rel30.2-503.precise_amd64.deb) ...
 * Stopping MySQL (Percona Server) mysqld                                                                                                                                                                [fail] 
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
 * Stopping MySQL (Percona Server) mysqld                                                                                                                                                                [fail] 
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/percona-server-server-5.5_1%3a5.5.30-rel30.2-503.precise_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
 * Stopping MySQL (Percona Server) mysqld                                                                                                                                                                [fail] 
invoke-rc.d: initscript mysql, action "stop" failed.
 * Starting MySQL (Percona Server) database server mysqld                                                                                                                                                [ OK ] 
Errors were encountered while processing:
 /var/cache/apt/archives/percona-server-server-5.5_1%3a5.5.30-rel30.2-503.precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
1  
What happens if you shut down the Percona Server yourself? stop mysql-server Also inspect the log files (syslog or other log you enabled for Percona). –  gertvdijk May 24 '13 at 14:22
1  
gertvdijk's tip works for me: service mysql stop && aptitude safe-upgrade –  Kevin Horst Jun 9 '13 at 13:54
add comment

3 Answers 3

Stop mysql first. Then run the update. It should then work.

share|improve this answer
add comment

ya, I get the same thing. It's jacking up all my apt-get installs because every one is having an error now.

* Stopping MySQL (Percona Server) mysqld  [fail]
invoke-rc.d: initscript mysql, action "stop" failed.

Any chance you db is listening on an ip and not a socket or 127.0.0.1?

share|improve this answer
add comment

I had exactly the same problem, the only way I was able to solve it was killing mysql:

ps aux | grep mysql 
mysql     1325 10.3  3.3 2216444 309324 ?      Sl   Sep24  22:38 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/
lib/mysql/ecom-mysql.err --pid-file=/var/lib/mysql/ecom-mysql.pid --socket=/var/run/mysqld/mysqld.sock --port=3306

sudo kill  -9 1325    
sudo apt-get update && sudo apt-get dist-upgrade
share|improve this answer
add comment

Your Answer

 
discard

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.