package lvm2 2.02.176-4.1ubuntu2 failed to install/upgrade: installed lvm2 package post-installation script subprocess returned error exit status 1

Bug #1746582 reported by Jeff Burns
184
This bug affects 42 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I *think* this was from trying to install python-guestfs

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: lvm2 2.02.176-4.1ubuntu2
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.8-0ubuntu7
Architecture: amd64
Date: Wed Jan 31 09:56:36 2018
ErrorMessage: installed lvm2 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2017-06-28 (217 days ago)
InstallationMedia: Kubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
Python3Details: /usr/bin/python3.6, Python 3.6.4, python3-minimal, 3.6.4-1
PythonDetails: /usr/bin/python2.7, Python 2.7.14+, python-minimal, 2.7.14-4
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu1
 apt 1.6~alpha7ubuntu1
SourcePackage: lvm2
Title: package lvm2 2.02.176-4.1ubuntu2 failed to install/upgrade: installed lvm2 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to bionic on 2018-01-30 (0 days ago)

Revision history for this message
Jeff Burns (admiraljkb) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lvm2 (Ubuntu):
status: New → Confirmed
Revision history for this message
j1n3l0 (nelo-onyiah) wrote :
Download full text (4.3 KiB)

If it helps I was trying to install vagrant when this happened. Output (of a second attempt) below:

$ sudo apt install vagrant
Reading package lists... Done
Building dependency tree
Reading state information... Done
vagrant is already the newest version (2.0.2+dfsg-2ubuntu2).
0 to upgrade, 0 to newly install, 0 to remove and 5 not to upgrade.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up lvm2 (2.02.176-4.1ubuntu2) ...
update-initramfs: deferring update (trigger activated)
Failed to restart lvm2-lvmetad.service: Unit lvm2-lvmetad.socket is masked.
invoke-rc.d: initscript lvm2-lvmetad, action "restart" failed.
● lvm2-lvmetad.service - LVM2 metadata daemon
   Loaded: loaded (/lib/systemd/system/lvm2-lvmetad.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:lvmetad(8)

Mar 09 16:06:24 ynap-techub systemd[1]: Started LVM2 metadata daemon.
Mar 09 16:36:08 ynap-techub systemd[1]: Stopping LVM2 metadata daemon...
Mar 09 16:36:08 ynap-techub systemd[1]: Stopped LVM2 metadata daemon.
dpkg: error processing package lvm2 (--configure):
 installed lvm2 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of libguestfs0:amd64:
 libguestfs0:amd64 depends on lvm2; however:
  Package lvm2 is not configured yet.

dpkg: error processing package libguestfs0:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            dpkg: dependency problems prevent configuration of libguestfs-reiserfs:amd64:
 libguestfs-reiserfs:amd64 depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.

dpkg: error processing package libguestfs-reiserfs:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            dpkg: dependency problems prevent configuration of libguestfs-perl:
 libguestfs-perl depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.

dpkg: error processing package libguestfs-perl (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
                                                                    dpkg: dependency problems prevent configuration of libguestfs-hfsplus:amd64:
 libguestfs-hfsplus:amd64 depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.

dpkg: error processing package libguestfs-hfsplus:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
                                                                    dpkg: dependency problems prevent configuration of libguestfs-tools:
 libguestfs-tools depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64...

Read more...

Revision history for this message
Yevhen (yevhen.b) wrote :

Same with me. But already lvm2 (2.02.176-4.1ubuntu3)
I was trying to install vagrant.

Revision history for this message
Yevhen (yevhen.b) wrote :
Download full text (3.9 KiB)

After that any "apt install" and also "apt upgrade" happens with this error.

sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up lvm2 (2.02.176-4.1ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Failed to restart lvm2-lvmetad.service: Unit lvm2-lvmetad.socket is masked.
invoke-rc.d: initscript lvm2-lvmetad, action "restart" failed.
● lvm2-lvmetad.service - LVM2 metadata daemon
   Loaded: loaded (/lib/systemd/system/lvm2-lvmetad.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:lvmetad(8)
dpkg: error processing package lvm2 (--configure):
 installed lvm2 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of libguestfs0:amd64:
 libguestfs0:amd64 depends on lvm2; however:
  Package lvm2 is not configured yet.

dpkg: error processing package libguestfs0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libguestfs-reiserfs:amd64:
 libguestfs-reiserfs:amd64 depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.

No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    No apport report written because MaxReports is reached already
                                  dpkg: error processing package libguestfs-reiserfs:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libguestfs-perl:
 libguestfs-perl depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.

dpkg: error processing package libguestfs-perl (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libguestfs-hfsplus:amd64:
 libguestfs-hfsplus:amd64 depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.

dpkg: error processing package libguestfs-hfsplus:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libguestfs-tools:
 libguestfs-tools depends on libguestfs0 (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs0:amd64 is not configured yet.
 libguestfs-tools dependNo apport report written because MaxReports is reached already
      No apport report written because MaxReports is reached already
                                                                    s on libguestfs-perl (= 1:1.36.13-1ubuntu3); however:
  Package libguestfs-perl is not configured yet.

dpkg: error processing package libguestfs-tools (--configure):
 dependency problems - leavi...

Read more...

Revision history for this message
Yevhen (yevhen.b) wrote :

I think I have found possible flow to reproduce the issue and workaround to fix it:

1) sudo apt install lvm2

Here installation finishes successfully.

2) sudo apt remove lvm2

3) sudo apt install lvm2

Here this issue appears.

4) sudo apt purge lvm2

5) sudo apt install lvm2

Here the issue disappears and installation finishes successfully.

Revision history for this message
Yevhen (yevhen.b) wrote :

In my case I have installed gnome-boxes before, lvm2 was installed as dependency. Then I removed gnome-boxes and made apt autoremove. I think after that the issue appeared for me.

Revision history for this message
John (jburtontrg) wrote :

In my case this bug happened after upgrading from 17.10. Have an LVM partition on a secondary HDD that would no longer mount, and while trying to fix fstab started to get the error.

yevhen.b's fix of purge and re-install seemed to work for me.

Revision history for this message
Kavan Lyles (redeauxtech) wrote :

I have this same issue with Ubuntu Budgie 18.04 LTS, this worked so far, apt purge lvm2 then apt install lvm2. Now I can update and install.

Thanks this issue was extremely annoying.

Revision history for this message
Chengkinhung (chengkinhung) wrote :

I just encounter the same issue, in my case, i run the following commands to solve it temporarily:

$ uname -a
Linux ckh-desktop 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ sudo /bin/rm -rf /etc/lvm/
$ sudo rm -rf /etc/lvm/backup/
$ sudo apt purge lvm2
$ sudo updatdb
$ sudo locate lvm2
$ sudo rm /var/crash/lvm2.0.crash
$ sudo rm /etc/systemd/system/lvm2-*
$ sudo rm /etc/systemd/system/sysinit.target.wants/lvm2-*
$ sudo apt install lvm2
$ sudo apt update
$ sudo apt upgrade

Revision history for this message
Froottools (froottools) wrote :

Thanks.

Revision history for this message
Victor Rafael (vcollado0) wrote :

Thanks @Chengkinhung (chengkinhung)

Revision history for this message
zhu (jacob404) wrote :

Thanks to Yevhen (yevhen.b) I fixed it by

sudo apt purge lvm2

Revision history for this message
krishnakoumar (krishnakoumar) wrote :

Thank you Yevhen (yevhen.b). It works.

Revision history for this message
George Kontis (giormatsis) wrote :

Yevhen (yevhen.b) works in rasberry pi4 with ubuntu server 20.04 arm64 & mate-desktop thnx ;)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers