How to fix error "Could not get lock" on ubuntu

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
Error message :

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?
How to fix the error:

Step 1: Check which processes are faulty

Code:
ps aux | grep apt
Step 2: If the process is getting error then kill that process

Code:
kill -9 processnumber
Step 3: remove /var/lib/dpkg/lock

Code:
sudo rm /var/lib/dpkg/lock
Step 4: Reset the process

Code:
sudo dpkg –configure -a
If after 4 steps and you still can not fix then reboot and check again.
 

Marc A

Well-known member
Registered
Joined
Jun 14, 2016
Messages
125
Points
18
Error message :



How to fix the error:

Step 1: Check which processes are faulty

Code:
ps aux | grep apt
Step 2: If the process is getting error then kill that process

Code:
kill -9 processnumber
Step 3: remove /var/lib/dpkg/lock

Code:
sudo rm /var/lib/dpkg/lock
Step 4: Reset the process

Code:
sudo dpkg –configure -a
If after 4 steps and you still can not fix then reboot and check again.
Hello!

I've used kill command when I had to stop a daemon. It actually works :D!

Cheers,

Marc A. :drinks:
 
Latest Threads
Recommended Threads
Replies
0
Views
1,857
Replies
7
Views
4,511
Replies
0
Views
2,303
Replies
4
Views
1,214
Similar Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top