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

Re: DPKG problem



[Internal error while calling pgp, raw data follows]
> -----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.
> 
> I have "lost" my /var/lib/dpkg/available 

that one's not too bad, apt-get update would update it...

> and /var/lib/dpkg/status files

ouch!

> 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.
 
Well, if your /usr filesystem is still in good shape, then all the 
directories in /usr/share/doc are names of packages you have installed.

You can advise apt (or maybe it's debconf) to answer a resounding No
to any changing of config files...

... and you can force the packages to install again, so their entries
would show up in status.

But me, I would do it on a whole copy that I'd inflicted on spare space
of a local desktop machine, and then look out for glitches.  e.g. version
upgrades on one or two things might need config file tweaks after all.

Is the rest of your dpkg directory ok, or is /var/lib/dpkg/info gone too?

> I have said files on other boxes, of fairly similar configuration.  Can I 
> hack on those files to get them into a working configuration?
 
In theory, yes -- status is a text file.

I've havked in "fake packages" to it before, they need a matching pkgname.list
file in the /var/lib/dpkg/info directory.  So if your info directory is shot
I'd say reinstall is a cleaner option.

For any given app that'd be

	apt-get --reinstall install lynx

(for example)

The worst problem is, "base" weren't installed in the normal fashion, and
may not be able to do anything but be upgraded.  So you may want to steal
a status file from at least a base-install debian.

> 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.
> 
> Any ideas?  Pointers?  Help?

Yeah

Desktop system
    :
    `-- chroot env of your laptop

run your reinstall and other rescue efforts on the chroot.  repeat as
many times as necessary until satisfied with the results.  graft them
safely into your working machine.

* Heather Stern * star@ many places...



Reply to: