Tuesday, May 24, 2016

software center - How do I unlock /var/lib/dpkg/lock?




I attempted to install dropbox on my Ubuntu system, but now I am unable to install or uninstall any software. I get this error:




E: Unable to lock the administration directory /var/lib/dpkg/lock?


I have already tried killing dpkg and restarting it sudo kill -TERM PID but it immediately tries to finish the installation again and gets stuck.



How do I resolve this?



sudo rm /var/lib/dpkg/lock should do the trick. You can use ps afx|grep dpkg to check if there is still a process runnning at the same time. sudo killall dpkg will stop all running dpkg processes.




If you need to cancel the dropbox installation, try
sudo dpkg --force-remove-reinstreq --remove nautilus-dropbox


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...