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’ve actually found that recently my apt-get isn’t closing cleanly either, so that it keeps running even if I close the terminal window. A quick “sudo killall apt-get” fixes that, although I’m guessing that this isn’t most proper way of doing things.
I’m unable to find anything running, system monitor says everything is sleeping. I even ran sudo killall for apt-get and synaptic and it says “apt-get: no process killed” etc. In the mean time I can’t update my 7.04 alpha system, it says run “dpkg –configure -a”. I ran it but don’t know what to do when it opens. var/lib/dpkg/lock with white X in brown box in the upper right corner, 0 bytes. Help me Ubuntu Geek, your my only hope.
Newbie
bob
could you please provide the exact error message and what you are trying to do
Thanks!!!!!!!!!
hahaha, i had synaptic open, i’m such an idiot, thank you 🙂
rm /var/lib/dpkg/lock
If we remove the lock file, Is there any influence of the system?
Thanks Q !!!!
thanks!
diane@dianes-desktop:~$ sudo apt-get install amarok-kde4
[sudo] password for diane:
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?
diane@dianes-desktop:~$ sudo apt-get install amarok-kde4
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
amarok-kde4: Depends: kdebase-runtime (>= 4:4.1.2) but it is not going to be installed
Depends: kdelibs5 (>= 4:4.1.3) but it is not going to be installed
Depends: libc6 (>= 2.8~20080505) but 2.7-10ubuntu4 is to be installed
Depends: libgcrypt11 (>= 1.4.0) but 1.2.4-2ubuntu7 is to be installed
Depends: libmtp8 but it is not installable
Depends: libphonon4 (> 4:4.2.0) but it is not going to be installed
Depends: libqt4-dbus (>= 4.4.3) but it is not installable
Depends: libqt4-network (>= 4.4.3) but it is not installable
Depends: libqt4-opengl (>= 4.4.3) but it is not installable
Depends: libqt4-script (>= 4.4.3) but it is not installable
Depends: libqt4-sql (>= 4.4.3) but it is not going to be installed
Depends: libqt4-svg (>= 4.4.3) but it is not installable
Depends: libqt4-webkit (>= 4.4.3) but it is not installable
Depends: libqt4-xml (>= 4.4.3) but it is not installable
Depends: libqtcore4 (>= 4.4.3) but it is not installable
Depends: libqtgui4 (>= 4.4.3) but it is not installable
Depends: libstreamanalyzer0 (>= 0.5.11) but it is not going to be installed
Depends: libstreams0 (>= 0.5.11) but it is not going to be installed
Depends: libtag1c2a (>= 1.5) but 1.4-8ubuntu1 is to be installed
Depends: phonon (> 4:4.2.0) but it is not installable
E: Broken packages
diane@dianes-desktop:~$ sudo apt-get install amarok-kde4
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
amarok-kde4: Depends: kdebase-runtime (>= 4:4.1.2) but it is not going to be installed
Depends: kdelibs5 (>= 4:4.1.3) but it is not going to be installed
Depends: libc6 (>= 2.8~20080505) but 2.7-10ubuntu4 is to be installed
Depends: libgcrypt11 (>= 1.4.0) but 1.2.4-2ubuntu7 is to be installed
Depends: libmtp8 but it is not installable
Depends: libphonon4 (> 4:4.2.0) but it is not going to be installed
Depends: libqt4-dbus (>= 4.4.3) but it is not installable
Depends: libqt4-network (>= 4.4.3) but it is not installable
Depends: libqt4-opengl (>= 4.4.3) but it is not installable
Depends: libqt4-script (>= 4.4.3) but it is not installable
Depends: libqt4-sql (>= 4.4.3) but it is not going to be installed
Depends: libqt4-svg (>= 4.4.3) but it is not installable
Depends: libqt4-webkit (>= 4.4.3) but it is not installable
Depends: libqt4-xml (>= 4.4.3) but it is not installable
Depends: libqtcore4 (>= 4.4.3) but it is not installable
Depends: libqtgui4 (>= 4.4.3) but it is not installable
Depends: libstreamanalyzer0 (>= 0.5.11) but it is not going to be installed
Depends: libstreams0 (>= 0.5.11) but it is not going to be installed
Depends: libtag1c2a (>= 1.5) but 1.4-8ubuntu1 is to be installed
Depends: phonon (> 4:4.2.0) but it is not installable
E: Broken packages
diane@dianes-desktop:~$
diane@dianes-desktop:~$ rm /var/lib/dpkg/lock
rm: remove write-protected regular empty file `/var/lib/dpkg/lock’? y
rm: cannot remove `/var/lib/dpkg/lock’: Permission denied
diane@dianes-desktop:~$
@Chroniclogic
Try to restart you pc and check if not run the following command
sudo apt-get -f install
Here were the results of the
sudo apt-get -f install
diane@dianes-desktop:~$ sudo apt-get -f install
Reading package lists… Done
Building dependency tree… 0%
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
texlive-base texlive texlive-fonts-recommended texlive-common mysql-common
libfftw3-3 tofrodos texlive-base-bin libmysqlclient15off ruby1.8 tetex-bin
tidy libtidy-0.99-0 ruby libtunepimp5 libifp4 texlive-latex-recommended
texlive-latex-base libpq5 libruby1.8 texlive-doc-base tex-common libnjb5
libofa0
Use ‘apt-get autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
diane@dianes-desktop:~$
Then I attempted the sudo apt-get install amarok-kde4
And received the same error,
Thanks for your response! 😛
I really think that Amarok will be awesome once its installed and working properly!
sudo rm /var/lib/dpkg/lock
then should it say something about other lock..
sudo rm /var/cache/apt/archives/lock
I “was” also having the lock problem; but I was trying to purge and install a package using a ruby script started by a Webmin Cluster Cron Job.
Anyway … the problem was the placement of the -y(es) switch. These work, putting the -y any where else FAILS with the lock problem.
apt-get –purge remove -y mediawiki
apt-get -y install mediawiki
Hi,
I encountered the same problem before, I accidentally close the terminal and tried to issue the same command (apt-get install kubuntu-kde4-desktop) and encountered the said error. Maybe we forgot the basic, I issued ps ax and simply kill the running process of apt-get and my problem solved!
Hope this helps…
thx it was as easy as 123
akj
I got this error after accidentally cancelling apt-get in the Terminal on Intrepid. Running sudo apt-get update fixed it.
vedachalam@vedachalam-laptop:~$ sudo apt-get install flashplugin-nonfree
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package adobe-flashplugin needs to be reinstalled, but I can’t find an archive for it.
here is my prblem…i dont know what happen…everytime i wanna upgrade, it will say that dont have enoght free space…
then i try install -f, it will show some error…and i dont know how to fix it…can u help me…this my scnd time i’m using linux…before this i dont have any problem with linux….
so how to fix this???
E: You don’t have enough free space in /var/cache/apt/archives/.
ryu@ryu-laptop:~$ sudo apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
binutils-static
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
linux-restricted-modules-2.6.28-16-generic
0 upgraded, 0 newly installed, 1 to remove and 267 not upgraded.
1 not fully installed or removed.
After this operation, 2421kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database … 102679 files and directories currently installed.)
Removing linux-restricted-modules-2.6.28-16-generic …
rmdir: failed to remove `/lib/modules/2.6.28-16-generic/volatile/’: No such file or directory
FATAL: Could not open ‘/boot/System.map-2.6.28-16-generic’: No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.28-16-generic
Cannot find /lib/modules/2.6.28-16-generic
update-initramfs: failed for /boot/initrd.img-2.6.28-16-generic
dpkg: error processing linux-restricted-modules-2.6.28-16-generic (–remove):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
linux-restricted-modules-2.6.28-16-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
ryu@ryu-laptop:~$ apt-get autoremove
E: Could not open lock file /var/lib/dpkg/lock – open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ryu@ryu-laptop:~$
ryu@ryu-laptop:~$ apt-get
apt 0.7.20.2ubuntu6 for i386 compiled on Apr 17 2009 04:25:29
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 …]
apt-get [options] source pkg1 [pkg2 …]
thanks kobewan
you solved my problem by the sentence sudo killall apt-ge
what i did i run
sudo apt-get update
then
sudo killall apt-get
then
i rerun the the installation of my chosen prog
thanks
I’ve cancelled some install in the middle and then had the problem, after issuing “sudo apt-get update” and “sudo dpkg –configure -a” the problem was solved.
I have similar problems, but I rented this server support says, I need to fix this myself 🙁 someone plz help me out here. error message from terminal
root@ks25559:~# sudo reboot
sudo: reboot: command not found
root@ks25559:~# reboot
The program ‘reboot’ can be found in the following packages:
* sysvinit
* upstart-compat-sysv
* molly-guard
Try: apt-get install
-bash: reboot: command not found
root@ks25559:~# sudo reboot
sudo: reboot: command not found
root@ks25559:~# apt-get install sysvinit
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?
root@ks25559:~# apt-get install
-bash: syntax error near unexpected token `newline’
You have new mail in /var/mail/admin
root@ks25559:~# apt-get install molly-guard
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?
root@ks25559:~# apt-get install upstart-compat-sysv
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?
root@ks25559:~# apt-get install
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?
You have new mail in /var/mail/admin
root@ks25559:~# apt-get install sysvinit
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?
root@ks25559:~# sudo reboot
sudo: reboot: command not found
root@ks25559:~# sudo killall apt-get
apt-get: no process killed
root@ks25559:~# sudo apt-get -f install
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?
root@ks25559:~#
regards
Thank you very mcuh.. it just worked for me
run this from terminal sudo rm /var/lib/apt/lists/lock
after that run sudo apt-get update
I have tried everything said here that matches my Problem. I have getting
When I try to install anything from my software center or in the terminal it says this.
E: Could not get lock /var/lib/dpkg/lock – open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I have tried everything and am new to this Please help anyone.
..the solution for solved to problems:
Open your Terminal:
1.sudo killall apt-get
then reinstall…
you should use :- sudo rm /var/lib/dpkg/lock
if problem still there then use:- sudo killall apt-get
thanx bro