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