cleanlinks breaks xterm and apt
Hi there,
I'm having some strange problems in light of an apparently stupid
maintenance action I took this afternoon. I've been getting emails to
root from cron saying that I have dangling symlinks in the man tree[1],
and so I thought I should get rid of them. I wasn't sure if I needed
to just delete them or do something else, and so I asked man. It
directed me to cleanlinks (1x), which I ran as root from / . I had
first checked out cleanlinks on Google to see if there was advice
about not using it as root or anything, but found nothing.
This was apparently a bad idea, as it turns out that there are about a
million dangling symlinks in subdirectories of /. Many of them have been
removed, but after I saw the huge number of filenames scrolling past my
screen, I killed cleanlinks with Ctrl-C. I had hoped that nothing bad
would happen, but it did.
The first thing I noticed was that xterm no longer works. Indeed, `which
xterm` gives no result. I thought I would reinstall it, to make sure
that everything is fine.
So I updated my apt cache, and then did apt-get install xterm[2], which
says xterm is already the current version and then gives a lot of errors
which look to be Perl-related. I tried installing a package that wasn't
already installed (xdesktopwaves, randomly), and got the same errors.
I am now in way over my head, and my system appears to be breaking. I've
exhausted the options I could think of for fixing the problems. There
may well be others that I haven't found yet.
I'd be most grateful if anyone could point me toward a way to fix this,
or even to find out what else has been broken. Before you ask, there
are no backups. The new USB external drive I bought for the purpose
wouldn't talk to my system, and I was in the middle of trying to get
it to work when I got the cron email and thought I would take care of
it.
As they say, fate is not without a sense of irony.
Thanks for all your help,
Hollis Easter
[1] i.e.:
/etc/cron.daily/man-db:
mandb: warning: /usr/share/man/man1/ctags.1.gz is a dangling symlink
mandb: warning: /usr/share/man/man1/etags.1.gz is a dangling symlink
mandb: warning: /usr/share/man/man1/emacs.1.gz is a dangling symlink
[2]
tamias:/# apt-get install xterm
Reading Package Lists... Done
Building Dependency Tree... Done
xterm is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
debconf: Perl may be unconfigured (Can't locate strict.pm in @INC (@INC
contains: /etc/perl /usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl
/usr/local/lib/perl/5.8.3 /usr/local/share/perl/5.8.3 .) at (eval
1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
) -- aborting
Setting up xterm (4.3.0.dfsg.1-10) ...
Can't locate File/Basename.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl /usr/local/lib/perl/5.8.3
/usr/local/share/perl/5.8.3 .) at /usr/sbin/install-docs line 19.
BEGIN failed--compilation aborted at /usr/sbin/install-docs line 19.
dpkg: error processing xterm (--configure):
subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
xterm
E: Sub-process /usr/bin/dpkg returned an error code (1)
-------------------------------------------
Hollis Easter easter@sccs.swarthmore.edu
Reply to: