0

Sometimes when I try to install something using sudo apt-get install it shows results looks like ---

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?

Now, I want to know the process(name , id) which is using it. If the process is no more needed I can kill it.

How can I know the process id?

alhelal
  • 2,741

1 Answers1

0

You can use "fuser" to get the pid of the pocess to kill:

sudo fuser /var/lib/dpkg/lock

you can use switch "-k" with fuser to kill the processes hanging on /var/lib/dpkg/lock

0x0C4
  • 713