Announcement

Collapse
No announcement yet.

Unable to lock admin directory error problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to lock admin directory error problem

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

    How do I fix this?

    #2
    First, make sure you don't have another package manager window or apt-get running somewhere.
    The full error would be more helpful, but I think that we can get the right file here

    Package managers, and some other programs use a "lock" file to prevent more than one instance of the program from running at the same time. In this instance, it is the package management system (apt and dpkg under the hood). Sometimes this lock file does not go away when there is a crash, the machine looses power, or whatever reason. All we have to do is delete the file that it is complaining about. Thing is, it can reside in a couple different places (I do not know why) but the line or two above the error you pasted would have given the full path in the message.

    Something like E: Could not open lock file /var/lib/dpkg/lock

    This is the offending "stale" lock file, and we would remove it using a file manager with admin privileges, or by:

    sudo rm /var/lib/dpkg/lock
    But we need to have the correct path to the file. If the above command does not remove a file (because it does not exist) you may have to run
    sudo apt-get dist-upgrade or similar command to see the full error message.

    Comment


      #3
      are you runing apt with sudo?

      occasionally i get this when update manager is doing some business in taskbar, this mostly happens shortly after system boot.
      oh, and mostly with Suse..

      yes! im cheating on you Kubuntu ha ha
      K 14.4 64 AMD 955be3200MHz 8GB 1866Mhz 6TB Plex/samba.etc.+ Macbook Air 13".

      Comment


        #4
        Originally posted by millusions View Post
        are you runing apt with sudo?

        occasionally i get this when update manager is doing some business in taskbar, this mostly happens shortly after system boot.
        oh, and mostly with Suse..

        yes! im cheating on you Kubuntu ha ha
        Well, yeah, as the updater is using the package management tools under the hood, this is to be expected.

        There is no such thing as cheating, linux is polyamorous

        Comment


          #5
          Originally posted by claydoh View Post
          There is no such thing as cheating, linux is polyamorous
          You mean it's from...Utah?

          Comment


            #6
            Originally posted by SteveRiley View Post
            You mean it's from...Utah?
            Naw, that would be like running 6 distros at the same time all the time. I think.
            My humor module is defective, so no good comeback there

            Comment

            Working...
            X