I have a problem with my apt-get routine. Problem is, I have sudo and want to update/upgrade, yet I get a "permission denied". Looks like this:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Looked for running processes blocking that file, found none. Rebooted the system, no change. Any other explanation and fix for this problem?
Question is a possible duplicate of Permission denied, are you root?, yet I was advised to ask it again... (This question doesn't answer MY question)
apt
? – Artur Meinild Nov 03 '22 at 10:02sudo lslocks
. The name of the process will be listed on the left. – mchid Nov 03 '22 at 10:21apt
was the process shown in the previous step), usepgrep -l apt
to check if the process is actually running. If and only if the process is not running and yourpgrep
command returns nothing, then you can safely delete the lockfile usingsudo rm /var/lib/dpkg/lock
– mchid Nov 03 '22 at 10:23sudo lslocks
command returns anything, then you can safely delete the lockfile. – mchid Nov 03 '22 at 10:27