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:21aptwas the process shown in the previous step), usepgrep -l aptto check if the process is actually running. If and only if the process is not running and yourpgrepcommand returns nothing, then you can safely delete the lockfile usingsudo rm /var/lib/dpkg/lock– mchid Nov 03 '22 at 10:23sudo lslockscommand returns anything, then you can safely delete the lockfile. – mchid Nov 03 '22 at 10:27