Re: aptitude works as root, not with sudo
Jeronimo Pellegrini, 2002-Oct-22 17:33 -0200:
> Hi.
>
> As the subject says, I've tried aptitude as root (runs perfectly),
> and with sudo. When I use sudo, I can't update the package database:
>
> sudo aptitude update
> Reading Package Lists... Done
> Building Dependency Tree
> Reading extended state information... Done
> Reading Package Lists... Done
> Building Dependency Tree
> Reading extended state information... Done
> W: Warning: could not lock the cache file. Opening in read-only mode
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
> E: Tried to dequeue a fetching object
>
> But I can use sudo dselect, sudo apt-get, etc, without problems. (And
> /usr/bin/aptitude is close to /use/bin/apt-get in /etc/sudoers, both
> should work the same)
>
> Could someone please try to reproduce this? Is there something I missed,
> maybe?
I get something similar running
$ sudo apt-get update && apt-get upgrade
The update works fine, but the upgrade gets this:
<snipped update stuff>
Fetched 2287kB in 13s (172kB/s)
Reading Package Lists... Done
Building Dependency Tree... Done
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
However, sudo aptitude works perfectly. I haven't figured it out
yet. Sorry I can't help yet, but I thought this info may help
troubleshoot.
jc
--
Jeff Coppock Systems Engineer
Diggin' Debian Admin and User
Reply to: