Dpkg Was Interrupted, You Must Manually Run 'sudo Dpkg --configure -a' To Correct The Problem Now
It cannot do two things at once. To prevent chaos, it creates a "lock file" whenever it is working. Think of this like a "Do Not Disturb" sign on a hotel room door.
This finishes any interrupted package configuration from a previous install/upgrade.
during a critical configuration step. System crash or kernel panic. It cannot do two things at once
Here is the "full story" of why this happens, what it means, and exactly how to fix it.
(e.g., sudo apt install <package> ).
sudo dpkg --configure -a
Warning: Only do this if Step 1 and Step 2 fail. what it means
Always let dpkg and apt finish completely, and avoid closing the terminal during system updates.
Once the locks are gone, force the package manager to reconfigure: sudo apt install <