PDA

View Full Version : [ubuntu] apt-get error could not open lock file



olddavd
June 1st, 2009, 07:05 PM
Help. I was trying to use apt-get update and got the following error:

E: Could not open lock file /var/lib/apt/lists/lock - open (13 Permission denied)
E: Unable to lock the list directory

I'm using Hardy Heron 8.04.1 64 bit version.

albinootje
June 1st, 2009, 07:08 PM
Help. I was trying to use apt-get update and got the following error:

E: Could not open lock file /var/lib/apt/lists/lock - open (13 Permission denied)
E: Unable to lock the list directory

Do you have Add/Remove or Synaptic package manager open ?
It's also possible that the update manager was just doing an apt-get update in the background.

Hospadar
June 1st, 2009, 07:10 PM
You need to add "sudo" to the beginning of the command
i.e.
sudo apt-get updateapt-get needs root (administrator) privilege, and when you prepend a command with sudo it gives the command root privilege.

(it stands for "Super-User DO")

olddavd
June 1st, 2009, 07:15 PM
Many thanks for the help. I feel a bit foolish not using "sudo".

sudo apt-get update

Works okay. How do I list this issue solved?