1

I was updating the apps and ubuntu via the software updater in my ubuntu 14.04 . But the updater froze and i had to forc quit it . Now i cant update or uninstall any apps or use apt-get upgrade or apt-get update (in apt get update , the error appears in the end of the update ). I get the 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?

I also get this error when using sudo apt get upgrade for the first time:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
David Foerster
  • 36,264
  • 56
  • 94
  • 147

3 Answers3

0

Do a reboot. Then wen started asnew run from terminal (ctrl+alt+t).

sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
Videonauth
  • 33,355
  • 17
  • 105
  • 120
  • I ran the code .. sudo apt-get update is working properly until the end where it shows Fetched 2,622 kB in 56s (46.3 kB/s)
    W: Failed to fetch http://www.openfoam.org/download/ubuntu/dists/trusty/main/source/Sources 404 Not Found

    E: Some index files failed to download. They have been ignored, or old ones used instead. E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. user@user-HP-Notebook:~$

    – mad_greasemonkey Mar 28 '16 at 02:38
  • As @heemayl already said in the comments in the before post run a sudo dpkg --configure -a and try again. If this fails aswell then the archive may be down at the moment then continue without it and try a full run of sudo apt-get update && sudo apt-get upgrade later. – Videonauth Mar 28 '16 at 05:01
0

try to repair broken packages

sudo apt-get clean
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get update

and if didn't work try

sudo fuser -cuk /var/lib/dpkg/lock
sudo rm -f /var/lib/dpkg/lock
sudo fuser -cuk /var/cache/apt/archives/lock
sudo rm -f /var/cache/apt/archives/lock
0

Thanks for all the help and support . I had previously tried sudo dpkg --configure -a ,, but it gave some result which i could not comprehend . But somehow today , when I ran the same code, it worked . The problem is fixed now .