Or in another situation where /var/lib/apt/lists/lock is problematic: sudo lsof /var/lib/apt/lists/lock The command provided by João should close the program that holds the lock and then remove the lock but won't protect you from install interruption: sudo fuser -cuk /var/lib/dpkg/lock sudo rm -f /var/lib/dpkg/lockĪnd the same command can be used for the apt cache lock: sudo fuser -cuk /var/cache/apt/archives/lock sudo rm -f /var/cache/apt/archives/lockįirst of all we should check what process created the lock file using lsof: sudo lsof /var/lib/dpkg/lock You can force the lock off by removing the file, but it's not recommended without first closing the program that's holding the lock safely, since you could cause corruption or interrupt an installation (bad). First try killing any running instance of apt or aptitude as described in Faheem's answer. IMPORTANT: only try the below as a last resort since it can crash your system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |