package libvirt-bin 0.8.8-1ubuntu6.2 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1

Asked by Jason Odoom

The upgrade will continue but the 'libvirt-bin' package may not be in a working state. Please consider submitting a bug report about it.

ProblemType: Package
DistroRelease: Ubuntu 11.04
Package: libvirt-bin 0.8.8-1ubuntu6.2
ProcVersionSignature: hostname 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Fri Jul 15 12:58:41 2011
ErrorMessage: ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
SourcePackage: libvirt
Title: package libvirt-bin 0.8.8-1ubuntu6.2 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to natty on 2011-07-15 (0 days ago)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu libvirt Edit question
Assignee:
No assignee Edit question
Solved by:
Andreas Moog
Solved:
Last query:
Last reply:
Revision history for this message
Andreas Moog (ampelbein) said :
#1

From the log:

Setting up libvirt-bin (0.8.8-1ubuntu6.2) ...
Adding group `libvirtd' (GID 132) ...
groupadd: cannot lock /etc/group; try again later.

It seems you have a leftover /etc/group.lock file, please remove that and do:

'sudo apt-get -f install'
'sudo dpkg --configure -a'

That should resolve your issue.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

Andreas Moog's advice should enable you to solve your problem. If you have trouble following his instructions, or you follow them but they don't work, please post a reply (with details) in this question.

Revision history for this message
Jason Odoom (jasonodoom) said :
#3

I've removed he group.lock file and ran sudo apt-get -f install and dpkg
--configure -a but still received an error. Here is the output:

jasono@Ubuntu:~$ sudo apt-get -f install
[sudo] password for jasono:
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 qemu-kvm
Suggested packages:
  tinyca
The following NEW packages will be installed:
  mysql-server-5.1 qemu-kvm
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
5 not fully installed or removed.
Need to get 0 B/9,236 kB of archives.
After this operation, 22.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 310568 files and directories currently installed.)
Unpacking qemu-kvm (from .../qemu-kvm_0.14.0+noroms-0ubuntu4.3_i386.deb) ...
groupadd: cannot lock /etc/gshadow; try again later.
addgroup: `/usr/sbin/groupadd -g 132 kvm' returned error code 10. Exiting.
dpkg: error processing
/var/cache/apt/archives/qemu-kvm_0.14.0+noroms-0ubuntu4.3_i386.deb
(--unpack):
 subprocess new pre-installation script returned error exit status 1
Unpacking mysql-server-5.1 (from
.../mysql-server-5.1_5.1.54-1ubuntu4_i386.deb) ...
groupadd: cannot lock /etc/gshadow; try again later.
addgroup: `/usr/sbin/groupadd -g 132 mysql' returned error code 10. Exiting.
dpkg: error processing
/var/cache/apt/archives/mysql-server-5.1_5.1.54-1ubuntu4_i386.deb
(--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/qemu-kvm_0.14.0+noroms-0ubuntu4.3_i386.deb
 /var/cache/apt/archives/mysql-server-5.1_5.1.54-1ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
jasono@Ubuntu:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of ubuntu-virt-server:
 ubuntu-virt-server depends on qemu-kvm; however:
  Package qemu-kvm is not installed.
dpkg: error processing ubuntu-virt-server (--configure):
 dependency problems - leaving unconfigured
Setting up libvirt-bin (0.8.8-1ubuntu6.2) ...
Adding group `libvirtd' (GID 132) ...
groupadd: cannot lock /etc/gshadow; try again later.
addgroup: `/usr/sbin/groupadd -g 132 libvirtd' returned error code 10.
Exiting.
dpkg: error processing libvirt-bin (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of kvm:
 kvm depends on qemu-kvm; however:
  Package qemu-kvm is not installed.
dpkg: error processing kvm (--configure):
 dependency problems - leaving unconfigured
Setting up openssh-server (1:5.8p1-1ubuntu3) ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /var/run/sshd -g nogroup -s /usr/sbin/nologin
-u 119 sshd' returned error code 1. Exiting.
dpkg: error processing openssh-server (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.1; however:
  Package mysql-server-5.1 is not installed.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ubuntu-virt-server
 libvirt-bin
 kvm
 openssh-server
 mysql-server

Sent from Ubuntu <http://www.ubuntu.com/desktop>.

On Sat, Jul 16, 2011 at 5:06 AM, Eliah Kagan <
<email address hidden>> wrote:

> Your question #164938 on libvirt in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/libvirt/+question/164938
>
> Status: Open => Answered
>
> Eliah Kagan proposed the following answer:
> Andreas Moog's advice should enable you to solve your problem. If you
> have trouble following his instructions, or you follow them but they
> don't work, please post a reply (with details) in this question.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/libvirt/+question/164938/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/libvirt/+question/164938
>
> You received this question notification because you asked the question.
>

Revision history for this message
Andreas Moog (ampelbein) said :
#4

/etc/gshadow is also locked, so remove /etc/gshadow.lock too. Then issue the same commands again.

Revision history for this message
Jason Odoom (jasonodoom) said :
#5

Removed it but no luck, even removed shadow.lock Here is the output:

jasono@Ubuntu:~$ gksudo nautilus
jasono@Ubuntu:~$ sudo apt-get -f intall
E: Invalid operation intall
jasono@Ubuntu:~$ sudo apt-get -f install
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 qemu-kvm
Suggested packages:
  tinyca
The following NEW packages will be installed:
  mysql-server-5.1 qemu-kvm
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
5 not fully installed or removed.
Need to get 0 B/9,236 kB of archives.
After this operation, 22.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 310568 files and directories currently installed.)
Unpacking qemu-kvm (from .../qemu-kvm_0.14.0+noroms-0ubuntu4.3_i386.deb) ...
Unpacking mysql-server-5.1 (from
.../mysql-server-5.1_5.1.54-1ubuntu4_i386.deb) ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /nonexistent -g mysql -s /bin/false -u 119
mysql' returned error code 1. Exiting.
dpkg: error processing
/var/cache/apt/archives/mysql-server-5.1_5.1.54-1ubuntu4_i386.deb
(--unpack):
 subprocess new pre-installation script returned error exit status 1
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.1_5.1.54-1ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
jasono@Ubuntu:~$ gksudo nautilus
jasono@Ubuntu:~$ sudo apt-get -f install dpkg --configure -a
E: Command line option --configure is not understood
jasono@Ubuntu:~$ sudo apt-get -f install
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 1 not upgraded.
6 not fully installed or removed.
Need to get 0 B/6,258 kB of archives.
After this operation, 13.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 310607 files and directories currently installed.)
Unpacking mysql-server-5.1 (from
.../mysql-server-5.1_5.1.54-1ubuntu4_i386.deb) ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /nonexistent -g mysql -s /bin/false -u 119
mysql' returned error code 1. Exiting.
dpkg: error processing
/var/cache/apt/archives/mysql-server-5.1_5.1.54-1ubuntu4_i386.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.54-1ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
jasono@Ubuntu:~$

Sent from Ubuntu <http://www.ubuntu.com/desktop>.

On Sat, Jul 16, 2011 at 1:35 PM, Andreas Moog <
<email address hidden>> wrote:

> /etc/gshadow.lock

Revision history for this message
Best Andreas Moog (ampelbein) said :
#6

See

useradd: cannot lock /etc/passwd; try again later.

in the errormessage, there still is a lockfile in /etc, most likely /etc/passwd.lock

Revision history for this message
Jason Odoom (jasonodoom) said :
#7

I've removed it and got this output, seems to be working? :

jasono@Ubuntu:~$ gksudo nautilus
jasono@Ubuntu:~$ sudo apt-get -f install
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 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6,258 kB of archives.
After this operation, 13.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 310607 files and directories currently installed.)
Unpacking mysql-server-5.1 (from
.../mysql-server-5.1_5.1.54-1ubuntu4_i386.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up mysql-server-5.1 (5.1.54-1ubuntu4) ...
mysql start/running, process 4912
Setting up mysql-server (5.1.54-1ubuntu4) ...
jasono@Ubuntu:~$

Sent from Ubuntu <http://www.ubuntu.com/desktop>.

On Sat, Jul 16, 2011 at 1:56 PM, Andreas Moog <
<email address hidden>> wrote:

> Your question #164938 on libvirt in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/libvirt/+question/164938
>
> Status: Open => Answered
>
> Andreas Moog proposed the following answer:
> See
>
> useradd: cannot lock /etc/passwd; try again later.
>
> in the errormessage, there still is a lockfile in /etc, most likely
> /etc/passwd.lock
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/libvirt/+question/164938/+confirm?answer_id=5
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/libvirt/+question/164938
>
> You received this question notification because you asked the question.
>

Revision history for this message
Andreas Moog (ampelbein) said :
#8

Yes, now everything should be working fine for you.

Revision history for this message
Jason Odoom (jasonodoom) said :
#9

Thanks Andreas Moog, that solved my question.