0

I was trying to remove package with autoremove command & i got this error :

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?"

how to resolve this?

d a i s y
  • 5,511

2 Answers2

0

Try using "gksu nautilus" command in terminal and it will give you root access to whichever folder or file you need to move, delete, change. To change permissions right click the folder after you use gksu nautilus,

use "sudo -i" and enter in your root password, then use gksu nautilus.

Carlm3
  • 11
0

The message E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) means one of two things:

  1. If you are not running your command with sudo you don't have access to that file. You should have posted the complete command and its output, and formatted it with the {} button.

or,

  1. Some other package manager has the file locked. Find out which one with:

sudo /usr/bin/lsof /var/lib/dpkg/lock

waltinator
  • 36,399