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.

Sponsored

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.

Sponsored

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

AI in 2025: is it an agentic year?

2024 was the GenAI year. With new and more performant LLMs and a higher number…

10 minutes ago

Canonical announces 12 year Kubernetes LTS

Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…

1 day ago

Ubuntu Weekly Newsletter Issue 878

Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…

2 days ago

How your feedback shapes the way we support open source software

At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…

2 days ago

How To Install osTicket v1.14 On Ubuntu 20.04

I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…

3 days ago

How To Install WordPress On Ubuntu 20.04

Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…

3 days ago