As a administer, newbie UNIX/Linux user ,or developer/programmer , you face a problem like this in your shell/bash in Ubuntu/Debian when any package is broken or due to any reason your get lock /var/lib/dpkg/lock. or like below you face problem
root@pythongeek:~# apt-get update
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?
you can fix this problem in few steps without rebooting !!
1) type this in bash
sudo dpkg --configure -a
2) type in bash
sudo killall apt-get apt aptitude adept synaptic
your output like this
root@pythongeek:~# sudo killall apt-get apt aptitude adept synaptic
apt-get: no process found
apt: no process found
aptitude: no process found
adept: no process found
synaptic: no process foun
Note:if you face problem during installation of any software/package
don't forget accept EULA ,or accepting licensee of user agreement while you have pop-up during installation
3) this is final if you failed last to attempt to unlock
Close all running packages, and open a Konsole window.
type in bash
sudo rm /var/lib/dpkg/lock
then again type this bash
sudo dpkg --configure -a
for reinstallation type like this in bash
sudo apt-get install -f package name here
root@pythongeek:~# apt-get update
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?
you can fix this problem in few steps without rebooting !!
1) type this in bash
sudo dpkg --configure -a
2) type in bash
sudo killall apt-get apt aptitude adept synaptic
your output like this
root@pythongeek:~# sudo killall apt-get apt aptitude adept synaptic
apt-get: no process found
apt: no process found
aptitude: no process found
adept: no process found
synaptic: no process foun
Note:if you face problem during installation of any software/package
don't forget accept EULA ,or accepting licensee of user agreement while you have pop-up during installation
3) this is final if you failed last to attempt to unlock
Close all running packages, and open a Konsole window.
type in bash
sudo rm /var/lib/dpkg/lock
then again type this bash
sudo dpkg --configure -a
for reinstallation type like this in bash
sudo apt-get install -f package name here
FOLLOW US OF TWITTER
THANKS FOR VISITING
thank gan ..
ReplyDeleteYou're awesome. thanks.
ReplyDelete