package mysql-server-5.1 (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1

Bug #734113 reported by James John McGinnis
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.1 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Installing mythtv and mysql-dfsg 5.1 failed to install. Using ultimate edition 2.7 (Ubuntu 10.04 64 bit)

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: mysql-server-5.1 (not installed)
ProcVersionSignature: Ubuntu 2.6.32-29.58-generic 2.6.32.28+drm33.13
Uname: Linux 2.6.32-29-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sat Mar 12 14:23:15 2011
ErrorMessage: subprocess new pre-installation script returned error exit status 1
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 (not installed) failed to install/upgrade: subprocess new pre-installation script returned error exit status 1

Revision history for this message
James John McGinnis (james-jamesmcginnis) wrote :
Revision history for this message
James Page (james-page) wrote :

Error from log:

Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.41-3ubuntu12.10_amd64.deb) ...
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 104, <GEN0> line 7.
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /var/lib/mysql -g mysql -s /bin/false -u 121 mysql' returned error code 1. Exiting.
Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83.
Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.1_5.1.41-3ubuntu12.10_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1

Revision history for this message
James Page (james-page) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

It looks like another process had a lock (or had left one around) on the /etc/passwd file.

Please can you look for a file called /etc/passwd.lock - if this is present please remove and re-attempt the installation of mysql-sever-5.1:

  sudo apt-get install mysql-server-5.1

You can also see if another process has the file locked by using the fuser command:

  fuser /etc/passwd

I think that its unlikely that this will return anything, but if it does please can you append the information about the process locking the file to this bug report; you could try killing the process and re-installing as described above.

Please update this bug report if this resolves your issue.

Changed in mysql-dfsg-5.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
James John McGinnis (james-jamesmcginnis) wrote :

Second attempt to install mysql:

It would not install via Ubuntu Software Center (Installing Mythtv which mysql is a dependency). Attempted to install broken package via apt-get. Now I get the following error.

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  mysql-server-5.1
Suggested packages:
  tinyca
The following NEW packages will be installed:
  mysql-server-5.1
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
19 not fully installed or removed.
Need to get 0B/7,105kB of archives.
After this operation, 15.7MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
(Reading database ... 632817 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.41-3ubuntu12.10_amd64.deb) ...
useradd: cannot lock /etc/shadow; try again later.
adduser: `/usr/sbin/useradd -d /var/lib/mysql -g mysql -s /bin/false -u 121 mysql' returned error code 1. Exiting.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.1_5.1.41-3ubuntu12.10_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.1_5.1.41-3ubuntu12.10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
James Page (james-page) wrote :

OK well that moved us forward; but it looks like something had also left a .lock file on /etc/shadow.

Please can you repeat the process but for /etc/shadow.lock - might also be worth looking to see if there are any other .lock files present in the /etc/ directory.

Thanks

Revision history for this message
Joshua Lückers (joshualuckers) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-dfsg-5.1 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-dfsg-5.1 (Ubuntu):
status: Incomplete → Expired
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.