Error message on upgrade

Errors were encountered while processing:
lvm2
E: Sub-process /usr/bin/dpkg returned an error code (1)

upgrade via terminal Zorin OS 16.1 Pro:
CPU: 6-Core Intel Core i7-8700 (-MT MCP-) speed/min/max: 900/800/4600 MHz Kernel: 5.13.0-44-generic x86_64 Up: 6h 04m
Mem: 5389.5/31968.8 MiB (16.9%) Storage: 10.26 TiB (58.7% used) Procs: 389 Shell: bash 5.0.17 inxi: 3.0.38

Should I be concerned?

Did this occur after installing an application then attempting update?

1 Like

I would try:

sudo rm /etc/lvm

sudo apt install --reinstall lvm2

Yes, in the Software Center I had deleted the flatpak version of Boxes, and attempted to install the distro version (wanted USB redirection). The install of the distro version failed, so I went to the terminal, did a sudo apt update, upgrade, and got my first error. Continued on with an apt install gnome-boxes, got a message that most current version was installed, and got the lvm2 etc error message.

Boxes is installed, and working, so not sure why the software center install failed.

Thanks, gave it a try, no luck.

$     sudo rm /etc/lvm
rm: cannot remove '/etc/lvm': Is a directory
marcs@marcs-HP-ENVY-Desktop-795-00xx:~$ sudo apt remove lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dmeventd libdevmapper-event1.02.1 libgmime-3.0-0 liblvm2cmd2.03 libmessaging-menu0 libreadline5
  linux-headers-5.13.0-41-generic linux-hwe-5.13-headers-5.13.0-41 linux-image-5.13.0-41-generic
  linux-modules-5.13.0-41-generic linux-modules-extra-5.13.0-41-generic thin-provisioning-tools
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  lvm2
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 3,953 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 367276 files and directories currently installed.)
Removing lvm2 (2.03.07-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
marcs@marcs-HP-ENVY-Desktop-795-00xx:~$ sudo apt install --reinstall lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgmime-3.0-0 libmessaging-menu0 linux-headers-5.13.0-41-generic linux-hwe-5.13-headers-5.13.0-41
  linux-image-5.13.0-41-generic linux-modules-5.13.0-41-generic linux-modules-extra-5.13.0-41-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  lvm2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,053 kB of archives.
After this operation, 3,953 kB of additional disk space will be used.
Selecting previously unselected package lvm2.
(Reading database ... 367139 files and directories currently installed.)
Preparing to unpack .../lvm2_2.03.07-1ubuntu1_amd64.deb ...
Unpacking lvm2 (2.03.07-1ubuntu1) ...
Setting up lvm2 (2.03.07-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Failed to restart lvm2-lvmpolld.service: Unit lvm2-lvmpolld.socket is masked.
invoke-rc.d: initscript lvm2-lvmpolld, action "restart" failed.
● lvm2-lvmpolld.service - LVM2 poll daemon
     Loaded: loaded (/lib/systemd/system/lvm2-lvmpolld.service; static; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:lvmpolld(8)
dpkg: error processing package lvm2 (--configure):
 installed lvm2 package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-48-generic
Errors were encountered while processing:
 lvm2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can you try

sudo dpkg --configure -a

Sure:

     sudo dpkg --configure -a
[sudo] password for marcs:        
Setting up lvm2 (2.03.07-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Failed to restart lvm2-lvmpolld.service: Unit lvm2-lvmpolld.socket is masked.
invoke-rc.d: initscript lvm2-lvmpolld, action "restart" failed.
● lvm2-lvmpolld.service - LVM2 poll daemon
     Loaded: loaded (/lib/systemd/system/lvm2-lvmpolld.service; static; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:lvmpolld(8)
dpkg: error processing package lvm2 (--configure):
 installed lvm2 package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-48-generic
Errors were encountered while processing:
 lvm2

Let's try

sudo apt purge lvm2 && sudo apt clean && sudo apt autoremove

sudo apt install lvm2

1 Like

Thanks, that seems to have done the trick

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.