08.21.2019
Solve dpkg error: Errors were encountered while processing: lvm2
After upgrade my Ubuntu from 16.04 to 18.04, I got following error when installed vagrant or some others software
Errors were encountered while processing:
lvm2
libguestfs0:amd64
libguestfs-reiserfs:amd64
libguestfs-perl
libguestfs-hfsplus:amd64
libguestfs-tools
libguestfs-xfs:amd64
I made a lot of research on google and stackoverflow
Finally, I got result for my case at https://unix.stackexchange.com/a/399215
I follow their guide like this
sudo mv /var/lib/dpkg/info/lvm2.* /tmp/
sudo mv /var/lib/dpkg/info/libguestfs0:amd64.* /tmp/
sudo mv /var/lib/dpkg/info/libguestfs-reiserfs:amd64.* /tmp/
sudo mv /var/lib/dpkg/info/libguestfs-perl.* /tmp/
sudo mv /var/lib/dpkg/info/libguestfs-hfsplus:amd64.* /tmp/
sudo mv /var/lib/dpkg/info/libguestfs-tools.* /tmp/
sudo mv /var/lib/dpkg/info/libguestfs-xfs:amd64.* /tmp/
sudo dpkg --remove --force-remove-reinstreq lvm2 libguestfs0:amd64
libguestfs-reiserfs:amd64 libguestfs-perl libguestfs-hfsplus:amd64
libguestfs-tools libguestfs-xfs:amd64
Then problem was disappear and everything work correctly
Hope this help
Happy coding