Categories: debianUbuntu

[SOLVED] E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

You get the following error message while installing a .deb package on Debian or Ubuntu or while installing Updates?

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?

This error means that there is already an apt process running or the apt process dies and left his lock file.

Solution

First, you should wait a few minutes to ensure that the lock has not been set by the automatic update job (in case you enabled automatic updates on your system). If you just run an apt command and this command ended abruptly e.g. due to a disconnect of your SSH session, then there is no need to wait.

When the same error still shows up after you waited some time, then it’s time to fix the issue by removing the stale apt lock file.

Run this command to remove the lock file:

sudo rm -f /var/lib/dpkg/lock

Now you should be able to run the original apt command successfully.

The post [SOLVED] E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? appeared first on FAQforge.

Ubuntu Server Admin

Recent Posts

Predict, compare, and reduce costs with our S3 cost calculator

Previously I have written about how useful public cloud storage can be when starting a…

3 days ago

One Thread to Poll Them All: How a Single Pipe Made WaterDrop 50% Faster

This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…

4 days ago

A year of documentation-driven development

For many software teams, documentation is written after features are built and design decisions have…

4 days ago

Announcing FIPS 140-3 for Ubuntu Core22

With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…

5 days ago

The foundations of software: open source libraries and their maintainers

Open source libraries are repositories of code that developers can use and, depending on the…

1 week ago

From inspiration to impact: design students from Regent’s University London explore open design for their dissertation projects

Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…

1 week ago