How to fix lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) Error
Sponsored Link
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?
Solution
First thing you need to check Synaptic Package Manager open at the same time
or
That happens when synaptic or another package update / installation application is already running. Close any other package managers (including Add/Remove application, language pack installer, etc.) and retry.
I found out the problem.
When you run sudo apt-get update
you may find some lines saying “Failed to fetch http://…”
This is the reason of lock.
Check your software sources and uncheck unfetched links from active, reload it and Woula
Hi I have a very big prob, my iphone was and still is stuck in safe mode because of fake fermware i could not remove, so i went to var,lib apt,list and deleted all except partial, that didnt work so i went to var,lib,dpkg, and deleted the updates and mistakely the files down below update, now my computer will not recognise my iphone plus there is nothing in cydia under manage except the headlines no packages it says no such files as var,lib dpkg, please help.
ps -e | grep apt (might show you a number which is essentially a job number. My system was locked due to apt-get and showed me apt-get as job number 1594)
sudo kill 1594 (modify number to your current run)
This works perfect without having to delete the lock and causing unnecessary changes to your system
kein i dont get it o.o… like what do i uncheck im like new to ubuntu
how can i unlock the var/libs/dpkg/lock file…..plz some buddy short me out
All processes in linux create lock files that tell another process that it is running or in use. This is so that two programs do no write to a file at the same time and cause each other problems.
One way to force close the process if you can not do it properly is
lsof | grep /var/lib/dpkg/lock
returns something like.
xx number xx xx xx xx xx xx xx /var/lib/dpkg/lock
type kill -9 number (this will kill the process id from above)
—-
lsof justs lists all open files on your system, and you can use a command like grep to search for the file that is suspect which can be killed if necessary
thanx
sudo rm /var/lib/apt/lists/lock
thanks a looot
:-*
it works great …
I kill any process which contains apt !!!
but it works fine 🙂
Thanks Eruaran. That worked for me.
Nothing working for me. I am newb and might be screwing it up. Copied and pasted several of the above options to Konsole and tried them ….nothing removing “lock”. Permissions?
no problem I am root, what do I do?
Hey , Nothing working for me. I am newb and might be screwing it up. Copied and pasted several of the above options to Konsole and tried them…but none of this worked also when i tried from synaptic package manager ..it didnt work !!!,please guide what to do ?
thanks Eruaran
it works for me 😉
Hey friends,
just type
sudo bash (or) sudo -s
This makes you the root user and obtain administrator previlages. type “whoami” and check that you will be the root user…now all apt commands work..
…cheers..rakhu…
Thanks Rakhunathan
ps -e | grep apt identified the process number
Followed by:
sudo kill #### did not kill the process
lsof | grep /var/lib/dpkg/lock did not return any results
However, log off/on did. 🙂
from the terminal identify the process number with ps -e | grep apt
then kill the process with
kill -9 ####
thnx rakhunathan 🙂
rakhunathan man u helped me save my day.
thanks
@Rakhunathan,
It worked great thanks mate 🙂
thanks Eruaran it worked for me
I get the following when I run the command, not sure what to do further.
[email protected]:~$ ps -e | grep apt
4093 ? 00:00:00 aptd
[email protected]:~$ kill -9 4093
bash: kill: (4093) – Operation not permitted
try to run this commnd as root using the following command
sudo kill -9 4093
enter your password
try this running this line in your terminal:::sudo killall dpkg && killall frontend
then run:::sudo apt-get update
worked for me !! thanks