0

This is the error message I get in my Ubuntu server 14.04.4LT while installing packages:

could not get lock /var/lib/dpkg/lock - open (11 resources temporary not available)
unable to lock the administrative directory (/var/lib/dpkg/) another process using it.
Aaron
  • 6,714
taiwo
  • 1
  • 1

2 Answers2

1

You can see which program locked the file by using this command:

# lsof /var/lib/dpkg/lock

Sometimes on desktop environment, the packagekit locks the file to find new updates when you need to use apt-get ...

Then, when you know the process wich lock apt-get, you can exit it by using the kill command.

monitor35
  • 537
  • 1
  • 4
  • 8
1

Analyze the error.

ERR: could not get lock /var/lib/dpkg/lock - open (11 resources temporary not available) means that the lock is unavailable to the installer service.

...the administrative directory (/var/lib/dpkg/) another process using it. means that another process is using that directory.

The /var/lib/dpkg directory is the directory that contains all of the resources the installer service needs to install and/or uninstall. The lock files are the files that the installer/uninstaller to 'lock' the directory so only he can use it. So if you were uninstalling something while the package was installing (or vice versa) the whole /var/lib/dpkg directory was being used by Program B, and Program A isn't able to use it.

(think of it as if it was a restroom, two people can't use it at the same time! That's why you have to lock it. c;)

So the solution:

Wait until the other program finishes uninstalling, or any network traffic that has to do with automatically installed packages you can't see ends. Then install it. (the restroom would be vacant)

skybldev
  • 1,022