Unable to acquire the dpkg frontend lock

Published on


If you are trying your hands on Linux based OS and getting following error, means you are unable to allow current user a root privilege. A root or root-equivalent user can only get rid of this error.

E: Could not open lock file /var/lib/dpkg/lock-frontend – open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

How to fix unable to acquire the dpkg frontend lock, are you root?

The solution is very simple, add sudo before your command.

For example, assume you are trying to update the system like:

apt update

Simply add sudo before your command like this:

sudo apt update

Now you’ll be asked for a security key, which is the system password.

Seeing a user is not in sudoer file error?

This is rare and only happens if it’s not your system, or you don’t have complete access.

User is not in the sudoers file. This incident will be reorted.

The above error simply says the current logged-in user is not allowed to make any changes to the system and there are only two solutions, either switch to a root user or add your user to sudoer file.

If you have the root access, you can simply switch to root user and complete the command like:

sudo su

Now you’ll be asked for the root password, enter that and switch to the root user.

If you don’t have root user access, simply contact the system administrator and let them manage it. In a company environment you’ll never have access to root access, only admins can do whatever they want.

Did the above solution work?

Let me know if the above solution worked for you, and keep in mind that sudo is a very comprehensive security mechanism, and it is much more than just allowing a normal user to become root. Respect the security.

I hope the above solution worked for you, which is a classic beginner problem.

Published in: .

Leave a Reply

Your email address will not be published. Required fields are marked *