Could not open lock file


3 years ago
am having trouble with the update in ubuntu. I get an error message about a lock file that it cannot open. New to Linux and the instructions are not exactly clear. Help would be appreciated.

1. I opened terminal and ran the instructions for adding gpg key. That seemed to work ok. Then refreshed my sources (i.e. closed and reopened the sources file). Then restarted terminal and typed the 'apt-get update' command with this result:

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

stuck at this point.

3 years ago
That means you are not logged in as root which is needed.

Simple write

su

And type in your root password. If you have no idea what i talk about, then create a new root password with the following command

sudo passwd root

Enter first your own users password, then the new root pw. Now you can write su and login as root.

Reply

You are not logged in. Login or register to reply on this thread.