E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Colin Law clanlaw at googlemail.com
Wed Jun 15 09:32:52 UTC 2011


On 15 June 2011 10:24, Jordon Bedwell <jordon at envygeeks.com> wrote:
> On 6/15/2011 4:07 AM, amritpal pathak wrote:
>> E: Could not open lock file /var/lib/dpkg/lock
>> Tried to unlock as: sudo rm /var/lib/dpkg/lock .
>> It asked for password and then says:
>> rm: cannot remove `/var/lib/dpkg/lock': No such file or
>> directory i.e there is no suck a file/directory..but the  error shows it.
>
>
> You cannot have multiple package managers running at the same time.  If
> update-manager happened to proc while you were trying to apt it would
> have created a confusing incident like you experienced where one second
> it won't work but the next the lock is gone and cannot be manually
> removed. Did you happen to try it a couple minutes later after verifying
> no other package managers were open?
>
> Examples: synaptic, dpkg, apt, aptitude, software centre, update manager

If it is still not working tell us exactly what command you are using.

Colin




More information about the ubuntu-users mailing list