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

Re: DPKG problem



On Fri, Jan 11, 2002 at 10:26:10AM -0600, Matt Reynolds wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This may not be the appropriate list for this, but as I'm not sure what the 
> proper list is, I will throw myself at your collective mercy.

The correct list is probably debian-user...

> 
> I have "lost" my /var/lib/dpkg/available and /var/lib/dpkg/status files in a 
> FS error.  Beyond the actual errors themselves, how do I recover/regenerate 
> these files?  I poked in the archives and found some resounding answers 
> saying "Um, no", but I'm hoping I can hack on it.

[Take with a suitable amount of salt, untested]:

/var/lib/dpkg/available should be relatively easy to fix:
    # touch /var/lib/dpkg/available
    # apt-get update

/var/lib/dpkg/status:
    I *believe* that dpkg keeps a backup in /var/backups/dpkg.status*

> 
> I have said files on other boxes, of fairly similar configuration.  Can I 
> hack on those files to get them into a working configuration?

I wouldn't. I *believe* that dpkg uses /var/lib/dpkg/status to keep
track of what is installed. You'd be lying to dpkg if you changed the
files yourself.

> I'm loathe to reinstall, as the archives say I should, because I've had my 
> laptop running beautifully for many months now and I have things just as I 
> like them.

Once upon a time, I accidentally wiped /var (my days before proper
backups). So I didn't even have the files in /var/backups to play with.
I ended up making a copy of /etc, re-installing, re-mounting the old
/home and /tmp, and "apt-get install xxxx" a few times. And selectively
copy files from /oldetc to /etc. Took better part of a day (or was it
2?), but I got everything back to normal. And an upgrade in the process.

YYMV

> Any ideas?  Pointers?  Help?

Hope this helps

> 
> Thanks,
> Matt

-- 
          _  __
|/ _  _| |_   | _ __ _  _  _  _  _  _
|\(_|| | |_   |(/)| (_|(-'| |`-,(-`| |
            \_|      _|
http://www.karl.jorgensen.com

Attachment: pgpn6CZETbniI.pgp
Description: PGP signature


Reply to: