In some cases, dpkg won't run because it thinks another process is still using the database. You might see an error saying "Could not get lock /var/lib/dpkg/lock." If you are no other update is running, you can manually remove the lock files:
A sudden loss of power during software installation. In some cases, dpkg won't run because it
Fix broken dependencies:
Try these steps in order:
To avoid such issues in the future:
sudo apt update && sudo apt upgrade
sudo apt-get install -f