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

Jordon Bedwell jordon at envygeeks.com
Wed Jun 15 09:24:42 UTC 2011


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




More information about the ubuntu-users mailing list