Fix “Unable to lock the administration directory (/var/lib/dpkg/)” in Ubuntu

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

81 Responses

  1. awati says:

    Thank you .. it working nice and easy to follow ..

  2. suresh says:

    thanks sir , you are great

  3. Nix says:

    Your the best, thanks this solved my problem..

  4. henry says:

    Thanks a lot !

  5. Amol S says:

    Thank you very much for the solution, it helped me alot.

  6. Himanshu says:

    Thanks a lot buddy it worked for me :)

  7. yus says:

    Hi, I use Ubuntu 16.04, after i follow your step, the problem is solve but it come a new problem after input this command.

    $ sudo apt-get update..
    the problem is :
    E: Problem executing scripts APT::Update::Post-Invoke-Success 
    'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; 
    then appstreamcli refresh > /dev/null; fi'
    E: Sub-process returned an error code

    can you help me for solve this problem..?

  8. KaliUser says:

    you rock man, the 2nd command worked

  9. james says:

    Worked great! Thank you.

  10. Prasan says:

    Thanks a lot! It is working flawless

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.