0
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
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?

Vishnu N K
  • 595
  • 5
  • 22

4 Answers4

1

You will be able to see what is using the lock file:

lsof /var/lib/apt/lists/lock
lsof /var/lib/dpkg/lock

Be careful before delete the files ... there is certainly a reason if the files are block...

monitor35
  • 537
  • 1
  • 4
  • 8
0

This means that APT is in use by another process.

Could be: Software Center, Terminal (Something is waiting for confirmation), update center...

My best guess would be you initiated an install or upgrade and something need a confirmation or a "y" to continue.

Izzno
  • 924
0

Please try these commands from the terminal.

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
Vishnu N K
  • 595
  • 5
  • 22
  • should he be doing that if something is in the middle of updating/installing ? – Izzno Mar 29 '16 at 12:27
  • 2
    @IzznogooooD, it should be safe. Sometimes the lock file does not get deleted. This cold happen if the user accidentally closed a cli window while it was waiting for a y/n prompt, a glitch in a prior install or in the Software Center, or a failed install. As long as the user knows that he does not have an active install going, then not only is this safe, it is the only solution. That said, your point is valid if he is actively installing another program(the question is too vague to even make a guess) – TrailRider Mar 29 '16 at 13:01
  • @TrailRider Well explained. – Vishnu N K Mar 29 '16 at 13:43
-1

The questions or suggestions within the read out corresponding to the request are often pretty clear indications of the reason for the error. If you read the response given, you would understand the system is recommending that you are attempting to access or modify (run) dual processes on core files/directories.

Your admin directory is your bank vault, your security boxes in the the vault represent additional directories and their core configuration files. Your customer represents a command to access lock boxes. Your bank policy strictly prohibits multiple customers into the vault at the same time, to avoid any access which may lead to a mix up of contents between to customers having multiple lock boxes open and being sorted on a small table.

When updating, installing, or running core modification processes doing so concurrent to one another is not possible. This is a security guard. As the system is designed to take the command you give it as root, carry it into the safe, shutting the door, and not opening the door until any previous command has been completed.

However as mentioned, glitches happen and sometimes things go Wong. But in this case it's likely even just an update window open or some other prompt waiting for reply.

:)

DeGrincH
  • 1
  • 1