2

how to fix the broken packages? I am trying to install GMT v5 on Ubuntu 16.04. When I run following command:

$ sudo apt-get install subversion libgdal1-dev   
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 tried removing the locks using following commands

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock

but it did not work fo rme.

I also used synaptic manager to download the required library but it asks me to fix the broken packages first.

  • 1
    This is not about broken packages. At the same time you run the command, some process is doing the same. So, the package manager system keep it locked to prevent confict. Usually you should be able to run the command after few minutes. – Mostafa Ahangarha Feb 7 '17 at 13:58
4

You could do this:

sudo apt-get clean
sudo apt-get update

You can list broken packages :

dpkg -l | grep ^..r 

r state (on the third field) means: reinst-required (package broken, re-installation required)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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