package mysql-server-5.1 5.1.41-3ubuntu12.1 failed to install/upgrade: upgrade hanged. mysql refuses to stop in pre-removal script.

Bug #589297 reported by mikaelkael
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.1 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

First I try to migrate to mariadb, and now I try to recover original mysql

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: mysql-server-5.1 5.1.41-3ubuntu12.1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
NonfreeKernelModules: nvidia
AptOrdering:
 mysql-server: Remove
 mysql-server-5.1: Remove
 mysql-server-core-5.1: Remove
Architecture: i386
Date: Thu Jun 3 19:41:45 2010
ErrorMessage: Le paquet est dans un état incohérent - vous devriez le réinstaller avant d'essayer de le supprimer.
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['zftest', 'ibdata1', 'mysql', 'mysql_upgrade_info', 'debian-5.1.flag', 'ib_logfile1', 'cdm2010', 'ib_logfile0']
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 5.1.41-3ubuntu12.1 failed to install/upgrade: Le paquet est dans un état incohérent - vous devriez le réinstaller avant d'essayer de le supprimer.
mtime.conffile..etc.init.mysql.conf: 2010-06-01T23:42:05.918035

Revision history for this message
mikaelkael (perraud-mickael) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

This error occurs when a previous installation of the package has been interrupted. As suggested in the error message try reinstalling the package before removing it. Open a terminal and run:
$ sudo apt-get install --reinstall mysql-server-5.1

Then try to remove it again. If it fixes your issue, set the status of this report to 'invalid'
Thanks in advance.

Changed in mysql-dfsg-5.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
Ben Stoltz (benstoltz) wrote :

Same hang here. Installation is hung.

$ uname -a
Linux bubbles 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux

$ sudo apt-get install --reinstall mysql-server-5.1
[sudo] password for stoltz:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/7,103kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 165988 files and directories currently installed.)
Preparing to replace mysql-server-5.1 5.1.41-3ubuntu12.1 (using .../mysql-server-5.1_5.1.41-3ubuntu12.1_amd64.deb) ...
^Z
$ jobs -l
[1]+ 16265 Stopped sudo apt-get install --reinstall mysql-server-5.1
$ bg
$ pstree -p 16265 -l
apt-get(16265)───dpkg(16294)───frontend(16303)───mysql-server-5.(16311)───stop(16312)

Revision history for this message
mikaelkael (perraud-mickael) wrote :

Thanks Jean-Baptiste, but I have same problem as Ben. When I try:
$ sudo apt-get install --reinstall mysql-server-5.1
It's always stop without return just after:
Preparing to replace mysql-server-5.1 5.1.41-3ubuntu12.1 (using .../mysql-server-5.1_5.1.41-3ubuntu12.1_amd64.deb) ...

It's seems that the problem appears during the pre-removal process, I manually did a:
$ sudo /etc/init.d/mysql stop
// and not a:
$ sudo stop mysql

And I after I did:
$ sudo dpkg --purge --force-all mysql-server-5.1

And now It's OK

Revision history for this message
Ben Stoltz (benstoltz) wrote :

I was able to complete installation eventually.

Reboot was required.
Package removals, re-installations, killall -9 stop,
total removal of /var/lib/mysql.
Sorry for the lack of detailed notes.

Problems seemed to happen more when re-installing when /var/lib/mysql was already present.

Changed in mysql-dfsg-5.1 (Ubuntu):
status: Incomplete → Confirmed
summary: package mysql-server-5.1 5.1.41-3ubuntu12.1 failed to install/upgrade:
- Le paquet est dans un état incohérent - vous devriez le réinstaller
- avant d'essayer de le supprimer.
+ upgrade hanged. mysql refuses to stop in pre-removal script.
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.