1

When I use the command sudo apt-get update I get the following error

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?

Whats the meaning of this?

user227
  • 11

4 Answers4

2

seems like your apt is locked with another process. you can view which process is using apt with this command:

lsof /var/lib/dpkg/lock

to unlock it run this command:

sudo rm /var/lib/dpkg/lock
mehrdadep
  • 381
0

some Apt process is running on. You first need to close it.

use this command to see if there is any apt processors running:-

ps aux | grep apt

if you found it then u can kill it with its PID

kill -9 PID
0

You can use sudo lsof /var/lib/dpkg/lock to see what is using the lock

jorion@home{~}:$ sudo lsof /var/lib/dpkg/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
synaptic 7061 root   20uW  REG   8,54        0 131016 /var/lib/dpkg/lock

in this example its synaptic

John Orion
  • 2,801
-2

Try this command to abort apt-get process:

killall apt

May can help if other app used apt. after this command may you get some error to run apt again, if is, so run:

apt update -f