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.
  • As it says, 'another process using it'. Check if some app like Software Center is open, or another update is in progress Mar 18 '16 at 13:40

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.

  • pls how i get out of the problem,i need to install mysql
    – taiwo
    Mar 18 '16 at 14:24

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)

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