0

I'm getting this error while using sudo apt-get install command

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it

How do I solve it?

Kulfy
  • 18,154

2 Answers2

0

This should be used as last resort. If you use this carelessly you can end up with a broken system. Please try the other answers first before doing this.

You can delete the lock file with the following command:

sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory

sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

After then, updates the package lists :

sudo apt-get update  

Source

terdon
  • 104,119
kaushik
  • 41
  • 12
-1

You can try to reconfigure all unpacked but unconfigured packages by typing the following into a terminal :

sudo dpkg reconfigure -a
efthialex
  • 3,941