Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It says

Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

when I type sudo apt-get update && sudo apt-get upgrade in the terminal.

Can anyone help?

share|improve this question

marked as duplicate by Eliah Kagan, Kevin Bowen, Basharat Sialvi, Mitch, ændrük Apr 13 '13 at 6:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

This means that you have another process downloading and installing programs. First try looking for something that may be updating/installing. If you can't find anything, rebooting your machine and starting again may help. However, if none of that works, try killing whichever process has lock, and then configuring any programs that may have downloaded but weren't installed.

sudo fuser -vki /var/lib/dpkg/lock; sudo dpkg --configure -a

Source Note: Please read the source. It offers a lot of good information that you should know.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.