Puppet Error 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

0 votes
While trying to install puppet 6.7( puppet server) on Linux 18.04, I get the following error. How do I resolve it?
Aug 5, 2019 in Puppet by Karan
• 19,610 points
1,523 views

1 answer to this question.

0 votes

I faced the same error while i was trying to install puppet server. Here's what i did:

To fix the problem, all you need to do is to remove the lock files. But before you do that, it would be a good idea to stop any process that is using the lock files.

Use the lsof command to get the process ID of the process holding the lock files. 

Run these commands one by one.

lsof /var/lib/dpkg/lock
lsof /var/lib/apt/lists/lock
lsof /var/cache/apt/archives/lock

It’s possible that the commands don’t return anything, or return just one number. If they do return at least one number, use the number(s) and kill the processes like this (replace the PID with the numbers you got from the above commands):

sudo kill -9 PID

You can now safely remove the lock files using the commands below:

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

After that, reconfigure the packages:

sudo dpkg --configure -a

Now if you run the sudo apt update command, everything should be fine.

This worked for me!

answered Aug 5, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

How to install a package if it is not installed using puppet conditions

You will need to write a puppet ...READ MORE

answered Mar 18, 2020 in Puppet by Sirajul
• 59,230 points
2,052 views
0 votes
1 answer

“dpkg: error: dpkg frontend is locked by another process”

First, find out the id of the ...READ MORE

answered Aug 5, 2019 in Puppet by Sirajul
• 59,230 points
1,794 views
0 votes
1 answer

Error: Puppet agent lock file exist - skipping (/var/lib/puppet/state/agent_catalog_run.lock exists

This usually happens when you have already ...READ MORE

answered Sep 18, 2019 in Puppet by Sirajul
• 59,230 points
6,999 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,952 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP