Ubuntu APT-GET error : Could not get lock


I got following error when running apt-get on my Ubuntu 14.04 machine :

farhan@farhan-he:~/lms$ sudo apt-get update
[sudo] password for farhan:
E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

And here is how I solved the problem :

This should be used as last resort. If you use this carelessly you can end up with a broken system. Please try the other answers before doing this.

You can delete the lock file with the following command:

sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory

sudo rm /var/cache/apt/archives/lock

After that, try opening Synaptic again.

resource : source

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s