[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: installing packages with dpkg as not-root



On Thu, Mar 11, 2004 at 04:16:28PM -0800, Number Six wrote:
> Over on debian-devel,
> [http://lists.debian.org/debian-devel/2004/debian-devel-200403/msg00624.html],
> a thread got started about running "dpkg --force-not-root --root=`pwd`.
> 
> I asked the diff. between that and just extracting it, and was told it 
> would "update *a* (not *the*) package database).
> 
> So I created a new, fresh user, logged in as him, and ran:
> 
> $dpkg --root=`pwd` --force-not-root -i /path/to/tar_*.deb
> dpkg: unable to access dpkg status area: No such file or directory

That implies that you need a /var/lib/dpkg/status in your faked-up
system. I suggest creating one with zero length, and probably
/var/lib/dpkg/available too. You may want to use the --admindir option
to make /var/lib/dpkg be something more convenient.

> I do not know what I should do to have provided the "intitial structure" 
> to have made this work.  Please don't just answer "use a chroot" :: 
> please give me something like "untar basexxx.deb from the Woody CD".

woody uses debootstrap to set up an initial system, and debootstrap
handles all the details above. See:

  http://www.debian.org/doc/manuals/reference/ch-tips.en.html#s-chroot

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: