package mysql-server failed to install/upgrade: subprocess new pre-removal script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.1 (Ubuntu) |
Expired
|
Medium
|
Unassigned |
Bug Description
While upgrading Ubuntu, mysql 5.1 failed to install due to unknown reasons.
ProblemType: Package
Architecture: i386
Date: Fri Feb 12 18:36:54 2010
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess new pre-removal script returned error exit status 1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
Package: mysql-server-5.1 5.1.37-1ubuntu5
ProcVersionSign
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 5.1.37-1ubuntu5 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1
Uname: Linux 2.6.31-19-generic i686
Changed in mysql-dfsg-5.1 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in mysql-dfsg-5.1 (Ubuntu): | |
status: | Invalid → New |
Changed in mysql-dfsg-5.1 (Ubuntu): | |
status: | New → Incomplete |
I'm writing to add some more details re: this bug. I encountered the same problem and figured out what the apt-get upgrade command did that made the mysql upgrade fail.
I'm using a 64-bit version of Ubuntu 9.10 server on an Amazon EC2 instance. Since a couple weeks ago, "sudo apt-get upgrade" has failed because it can't upgrade MySQL successfully. When I run apt-get upgrade, the server downloads the latest MySQL files and stops the MySQL daemon in order to upgrade the server. But then it fails when trying to start MySQL.
When I investigated the cause of this error, I realized that the cause of the problem is that the "sudo apt-get upgrade" creates 2 binary log files which have the root:root account and group as the owner. These binary log files are in the directory /var/lib/mysql/ and have names like mysql-bin.000107. I'm not sure why "sudo apt-get upgrade" creates 2 files, but it always seems to create 2 files. When I change the owner of these binary log files to mysql:mysql, then MySQL successfully starts.
As a result of this bug, I haven't been able to successfully run sudo apt-get upgrade for a couple weeks. Any help or advice would be appreciated!
Here is info about my server.
Output from lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
Amazon EC2 AMI: I created my own AMI but built it on top of the official Canonical Ubuntu 64-bit 9.10 AMI in December, 2009.
CancelOk
Here's the output from the apt-get upgrade command:
Reading package lists... Done us.ec2. archive. ubuntu. com karmic-updates/main dpkg 1.15.4ubuntu2.1 [2,126kB] us.ec2. archive. ubuntu. com karmic-updates/main tzdata 2010e-0ubuntu0.9.10 [683kB] us.ec2. archive. ubuntu. com karmic-updates/main apache2 2.2.12-1ubuntu2.2 [1,426B] us.ec2. archive. ubuntu. com karmic-updates/main apache2-mpm-prefork 2.2.12-1ubuntu2.2 [2,376B] us.ec2. archive. ubuntu. com karmic-updates/main apache2.2-common 2.2.12-1ubuntu2.2 [285kB] us.ec2. archive. ubuntu. com karmic-updates/main apache2.2-bin 2.2.12-1ubuntu2.2 [1,309kB] us.ec2. archive. ubuntu. com karmic-updates/main apache2-utils 2.2.12-1ubuntu2.2 [155kB] us.ec2. archive. ubuntu. com karmic-updates/main dpkg-dev 1.15.4ubuntu2.1 [573kB] 1.15.4ubuntu2. 1_i386. deb) ...
Building dependency tree
Reading state information... Done
The following packages have been kept back:
bind9-host dnsutils libbind9-50 libdns50 libgssapi-krb5-2 libgssrpc4 libisc50 libisccc50 libisccfg50 libk5crypto3 libkadm5srv6 libkrb5-3 libkrb5-dev libkrb5support0 liblwres50 linux-ec2 linux-image-ec2 linux-image-virtual linux-virtual
The following packages will be upgraded:
apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common dpkg dpkg-dev tzdata
8 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
2 not fully installed or removed.
Need to get 5,136kB of archives.
After this operation, 65.5kB disk space will be freed.
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Fetched 5,136kB in 0s (16.4MB/s)
Preconfiguring packages ...
(Reading database ... 32789 files and directories currently installed.)
Preparing to replace dpkg 1.15.4ubuntu2 (using .../dpkg_
Unpacking replacement dpkg ...
Processing tr...