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.
abhimanyu@ABHIMANYU:~$ sudo apt-get install -y ubuntu-restricted-extras  
[sudo] password for abhimanyu:  
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  
E:E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

How do I solve this problem?

share|improve this question
    
just restart your machine and try again? –  neo1691 Aug 17 '13 at 8:37
add comment

2 Answers 2

The issue is that the packet manager is being used by some other application which locks it. You just need to follow the next few steps and everything is solved :

• Kill all the packages anyway:

      killall -9 apt* dpkg

• If you ever use synaptic, you should make that:

      killall -9 apt* dpkg synaptic

•Having confirmed that there is no "rogue" pkg. managers running, check, remove, & rechecke the lock file:

      ls -l /var/lib/dpkg/lock
      rm -f /var/lib/dpkg/lock
      ls -l /var/lib/dpkg/lock

•Finally, just fix it up:

     aptitude safe-upgrade
     dpkg --configure -a  

•In the end if required just update the file database using

     sudo updatedb
share|improve this answer
add comment

The answer is a lot easier. You cannot use several programs at the same time to install software. You need to make sure there is no other software management tool running. Just check whether you have the ubuntu software centre open or whether you have synaptic running. If so, close them. If in doubt, just reboot or log out and log in again.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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