DPKG Was Interrupted, You Must Manually Run dpkg –configure -a to correct the problem
Now I share Ubuntu server upgrade command error like dpkg was interrupted, you must manually run dpkg –configure -a to correct the problem. So I remove this error using below method.
When run apt upgrade so I see below error.
$ apt upgrade
Error :
dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem
So I run dpkg –configure -a this command then again see below error.
$ dpkg –configure -a
Error:
dpkg: error: parsing file ‘/var/lib/dpkg/updates/0004’ near line 0
newline in field name ‘#padding’
Solution : #01
rm /var/lib/dpkg/updates/000* apt-get clean apt-get update apt-get install ttf-mscorefonts-installer dpkg --configure -a apt upgrade -y
Sometime fix package needed like below command.
apt --fix-broken install apt-get update
Now install another package using apt command.
Error below:
packages can be upgraded. Run ‘apt list –upgradable’ to see them.
E: Could not get lock /var/lib/dpkg/lock-frontend – open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
Solution :#02
lsof /var/lib/dpkg/lock lsof /var/lib/apt/lists/lock lsof /var/cache/apt/archives/lock sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock dpkg --configure -a lsof /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock-frontend sudo dpkg --configure -a apt upgrade -y
Enjoy it 🙂
im unable to open the locked file 13: Permission denied
Must be login as root user otherwise Permission denied.
Thanks.