can not install software in linux error as dpkg was interrupted
Solution 1
This error occurs when you stop any installation while it's in progress. Regardless of whether you are using the terminal or the Ubuntu app center, the error will still be generated.
You can solve this by removing the broken installation. To do so, enter the following commands in the terminal in the order they are written.
cd /var/lib/dpkg/updates
sudo rm *
sudo apt-get update
Solution 2
run the command sudo dpkg --configure -a
Solution 3
After searching a lot I got a satisfactory result:
I found some places saying to run commands:
sudo apt-get install -f
sudo dpkg --configure -a
But none of those above worked.
The solution that worked to me:
sudo dpkg --configure --pending
I hope this helps
MMMMS
Updated on September 03, 2021Comments
-
MMMMS over 2 years
I was trying to install mono using following commands,
sudo apt-get install mono-*
unfortunately, I closed the terminal while it installing. again i started to reinstall but shown error like
Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
I tried below commands for solution,
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
But now I am getting the error like
dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
how do I fix this one?