On Wed, Nov 13, 2002 at 04:21:59AM +0000, Pigeon wrote: > Well I've got round my ldconfig problems. Eventually I found > base2_1.tgz on my Debian CD, unzipped it on my Windoze box, wrote it > to a CD, and copied stuff in using the rescue disk. With the addition > of some of the rescue disk itself (fsck) I got an ldconfig, and got it > to boot again, after several false starts. I then used dpkg -i to > reinstall most of the stuff in main/binary-i386/base which got most > stuff working, including dselect. > > I'm now using dselect to reinstall pretty much everything and get the > system back into a consistent state. I have got a few errors on some > packages due to /var/lib/dpkg/alternatives/foo being corrupt. (eg. foo > = awk) > > Is it permissible simply to delete these files? Will I risk breaking > the whole thing again? If so, how do I restore them?
See man update-alternatives to see how you would normally modify files in /var/lib/dpkg/alternatives. I am not sure if anything would break if you just delete the files. The files in /var/lib/dpkg/alternatives are ascii text, so you could edit them with vi, emacs, bvi, or any text editor. I would suggest bvi or ghex so you can see what nonprintable are in the files. Here is a couple of examples (vi & emacs) of what files in /var/lib/dpkg/alternatives look like. These would be different on you computer depending on what packages you have installed. $ cat /var/lib/dpkg/alternatives/vi manual /usr/bin/vi vi.1.gz /usr/share/man/man1/vi.1.gz /usr/bin/nvi 30 /usr/share/man/man1/nvi.1.gz /usr/bin/vim 120 /usr/share/man/man1/vim.1.gz /usr/bin/elvisnox 120 /usr/share/man/man1/elvis.1.gz /bin/elvis-tiny 10 /usr/share/man/man1/elvis-tiny.1.gz /usr/bin/e3vi 10 /usr/share/man/man1/e3vi.1.gz $ cat /var/lib/dpkg/alternatives/emacs auto /usr/bin/emacs emacs.1.gz /usr/share/man/man1/emacs.1.gz /usr/bin/emacs21 24 /usr/share/man/man1/emacs.1emacs21.gz /usr/bin/e3em 10 /usr/share/man/man1/e3em.1.gz /usr/bin/emacs20 23 /usr/share/man/man1/emacs.1emacs20.gz The first line of the /var/lib/dpkg/alternatives/foo is mode. Second line is the alternative command symlink. Third line refers to filename in /etc/alternatives/ Fourth line is man symlink. Fifth line is single LF (hex 0A, '\n') The remaining lines are various alternative commands, priorities, and associated man pages. The file ends with two LFs. I hope this helps. -- Jerome
msg12838/pgp00000.pgp
Description: PGP signature