You got following message when you try to run apt-get update command in Ubuntu?
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
1. Search for processes
ps -A | grep apt-get
2. See if there is any process running as apt-get then kill that process
sudo kill -9
If the error persists, apply following commands in a termina,
sudo su
sudo rm /var/lib/apt/lists/lock
apt-get update
This may imply that a process using apt is already underway, simply close or update your package manager (Synaptic Package Manager), if the problem persists open a terminal and type the following command:
ReplyDeleteThis may imply that a process using apt is already underway, simply close or update your package manager (Synaptic Package Manager), if the problem persists open a terminal and type the following command:
ReplyDeletesudo rm /var/lib/dpkg/lock
This command alone can solve the problem?
Deletedear sir vimal i have tried the command you have given but i still encounter the same problem and i cannot install postfix on our server because of this error..
DeletePlease try this commands,
Deletesudo rm /var/lib/dpkg/lock
apt-get update
Err http://archive.ubuntu.com raring/main Sources
Delete404 Not Found [IP: 91.189.92.200 80]
@Lalit Patil ubuntu have stopped releasing updates for ubuntu 13.04.
DeleteThus, I recommend you to back up your files and install either ubuntu 12.04 or ubuntu 14.04.
@Lalit Patil Same thing happened with me.!
ReplyDeleteWhen I tried to figure it out, I came to know that ubuntu have stopped releasing any updates for ubuntu 13.04.
So, try downloading ubuntu 12.04/14.04.
Good Luck!
Better to use Ubuntu stable releases. E.g. 12.04 LTS and 14.04 LTS.
Deleteawesome this single command saved my 2days headache!boom!
ReplyDeletesudo rm /var/lib/dpkg/lock
ReplyDeleteResolved error using this above command :p)
This cmd resolves the pblm thankz
ReplyDeleteYou can also use the following command
ReplyDelete1. Search for processes
ps -A | grep apt-get
2. See if there is any process running as apt-get then kill that process
sudo kill -9
Thanks Vivek.
Deletethank you
Deleteafter sudo apt-get update
ReplyDeleteam getting below error
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Nooooo... Don't recommend deleting lock file... This may leave the user stranded with a broken system. This should be done only if everything else fails... By deleting a file used by system, you risk the system integrity. Don't be so fast in removing anything before trying other solutions. Before trying any solution that needs a manual modification to the system environment, reboot the system to see if the problem is solved.
ReplyDeleteVivek Kumar had suggested a fairly reasonable approach above. To add to his solution,
1. Search for process
ps aux | grep apt
This will catch all running processes that contain apt in their name.
2. If you see a process listed with apt-get or aptitude, kill that process as it got stuck and did not release the lock. do it with
sudo kill
Process-id is the process number that you identified from step 1.
If that doesn't work, then try (like Vivek suggested)
kill -9
Also, note that it is not a very good idea to kill ap-get process whlie it is installing packages, do this only if your ap-get got stuck (of course, it is the subject of this post).
In the end, if nothing above worked, you can remove the lock file at your own risk. But to reduce the risk of corrupting an installation, it is better to first close the program that's holding the lock (which in essence is covered by step #2 above). Be informed that this approach may even crash your system(but will reboot releasing the lock), this has never been my choice.
sudo fuser -cuk /var/cache/apt/lists/lock
sudo rm -f /var/cache/apt/lists/lock
OR (as the case may be)
sudo fuser -cuk /var/cache/apt/archives/lock
sudo rm -f /var/cache/apt/archives/lock
OR (if dpkg was stuck instead of apt)
sudo fuser -cuk /var/lib/dpkg/lock
sudo rm -f /var/lib/dpkg/lock
NOTE: Use any and every command in terminal only if you understand what you are doing. Don't use sudo unless you know what you are doing. Don't use rm -f (for that matter rm command in general) if you don't know what you are doing.
Hope this helps!
Ubuntu 13.04 is also a stable release. It's just not an LTS (long term support) which has a commitment (in general) from canonical to release updates for 5 years for server and 3 years for desktop. For all standard (non-LTS) releases, the maximum duration of support is 18 months.
ReplyDeleteBoth versions have pros and cons - LTS gets long term support and standard gets latest features. You decide which version you want. If you don't update your system very often, LTS is the way to go. I have 6 systems with a mix of both... :P
You can delete the lock file with the following command:
ReplyDeletesudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo apt-get update
This Worked for me in installing Inkscape. Thank You
ReplyDeleteVERY USEFUL FOR ME
ReplyDeleteapt-get update
ReplyDeleteAfter all above steps following lines appear,help!
0% [Connecting to 192.168.0.3 (192.168.0.3)] [Connecting to 192.168.0.3 (192.16
0% [Connecting to 192.168.0.3 (192.168.0.3)] [Connecting to 192.168.0.3 (192.16