Skip to content

Instantly share code, notes, and snippets.

@jadia
Last active December 1, 2018 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadia/158c004ec97ff430db7b1630f6a7d28a to your computer and use it in GitHub Desktop.
Save jadia/158c004ec97ff430db7b1630f6a7d28a to your computer and use it in GitHub Desktop.
How To Solve “sub process usr bin dpkg returned an error code 1″ Error in Ubuntu

I was having problem with lvm package.

dpkg: error processing package lvm2 (--configure):  
installed lvm2 package post-installation script subprocess returned error exit status 1  
Processing triggers for initramfs-tools (0.130ubuntu3.5) ...  
update-initramfs: Generating /boot/initrd.img-4.15.0-39-generic  
Errors were encountered while processing:  
lvm2  
E: Sub-process /usr/bin/dpkg returned an error code (1)  

ls -l /var/lib/dpkg/info | grep -i lvm

sudo mv /var/lib/dpkg/info/lvm* /tmp

This helped me resolve the dpkg error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment