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

Bug#45836: Broken symlinks /usr/lib/foo.so -> /lib/foo-x.y.z.so



Package: libc6
Version: 2.1.2-2

I'm not sure this is a libc6 issue. It could merely be a problem with
an older version. I'm guessing this is a duplicate of #34592 but I
thought I'd send this in just to be sure.

There's a lot of broken symlinks in my /usr/lib directory -- full
listing included below. All of the files the symlinks point to exist,
only their names have changed because their version number has. So the
symlinks are broken. They can be repaired by hand, but I couldn't find
a script to do that automatically, so I guess nobody has anticipated
this situation in the first place.

It would appear that these symlinks were installed by libc6-dev and
haven't been updated by other programs which updated those libraries.

What I think is that my previous libc6 upgrade broke these.
Unfortunately, while debugging this, I managed to repair the links and
I'm not particularly eager to go back and break them again ...

Detailed error messages and diagnostics below.

If you respond, please do so to era@iki.fi -- this &%¤&!! masquerading
Sendmail might think I'm at something like era@schildt or whatever.
(Grr.)


How I noticed
=============

I was about to install alsalib0.3.2_0.3.2-2.deb but the installation
bailed out with a lot of error messages. Here's a rerun:

 schildt (17:01:43) /usr/tmp# dpkg -i alsalib0.3.2_0.3.2-2.deb
 (Reading database ... 21038 files and directories currently installed.)
 Preparing to replace alsalib0.3.2 0.3.2-2 (using alsalib0.3.2_0.3.2-2.deb) ...
 Unpacking replacement alsalib0.3.2 ...
 Setting up alsalib0.3.2 (0.3.2-2) ...
 ldconfig: warning: can't open /usr/lib/libBrokenLocale.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libcrypt.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libdb.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libdl.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libm.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libndbm.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libnsl.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libnss_compat.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libnss_db.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libnss_dns.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libnss_files.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libnss_nis.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libpthread.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libresolv.so (No such file or directory), skipping
 ldconfig: warning: can't open /usr/lib/libutil.so (No such file or directory), skipping

 schildt (17:02:24) /usr/tmp# 

Actually, the installation seems to have thought it finished okay.

(I'm not yet at a stage where I can actually test whether it works. 
I'm in the middle of installing the other stuff I need to use this.
It might not even be supported on my computer.)


What's Broken
=============

ls -lL has the nice feature that only broken symlinks will be listed
with '->' so the following shows all the broken symlinks in /usr/lib:

 $ cd /usr/lib ; ls -lL | fgrep -e '->'
 lrwxrwxrwx   1 root     root           29 Jan 16  1999 libBrokenLocale.so -> /lib/libBrokenLocale-2.0.7.so
 lrwxrwxrwx   1 root     root           22 Jan 16  1999 libcrypt.so -> /lib/libcrypt-2.0.7.so
 lrwxrwxrwx   1 root     root           19 Jan 16  1999 libdb.so -> /lib/libdb-2.0.7.so
 lrwxrwxrwx   1 root     root           19 Jan 16  1999 libdl.so -> /lib/libdl-2.0.7.so
 lrwxrwxrwx   1 root     root           18 Jan 16  1999 libm.so -> /lib/libm-2.0.7.so
 lrwxrwxrwx   1 root     root            8 Jan 16  1999 libndbm.so -> libdb.so
 lrwxrwxrwx   1 root     root           20 Jan 16  1999 libnsl.so -> /lib/libnsl-2.0.7.so
 lrwxrwxrwx   1 root     root           27 Jan 16  1999 libnss_compat.so -> /lib/libnss_compat-2.0.7.so
 lrwxrwxrwx   1 root     root           23 Jan 16  1999 libnss_db.so -> /lib/libnss_db-2.0.7.so
 lrwxrwxrwx   1 root     root           24 Jan 16  1999 libnss_dns.so -> /lib/libnss_dns-2.0.7.so
 lrwxrwxrwx   1 root     root           26 Jan 16  1999 libnss_files.so -> /lib/libnss_files-2.0.7.so
 lrwxrwxrwx   1 root     root           24 Jan 16  1999 libnss_nis.so -> /lib/libnss_nis-2.0.7.so
 lrwxrwxrwx   1 root     root           22 Jan 16  1999 libpthread.so -> /lib/libpthread-0.7.so
 lrwxrwxrwx   1 root     root           23 Jan 16  1999 libresolv.so -> /lib/libresolv-2.0.7.so
 lrwxrwxrwx   1 root     root           21 Jan 16  1999 libutil.so -> /lib/libutil-2.0.7.so

The corresponding files all exist in different versions:

 $ cd /usr/lib ; ls -lL |
 > # Throw away anything not matching " -> /lib" (discard local broken links),
 > #  add a wildcard before .so to allow for version numbers, and get sh to
 > #  glob files matching the generated patterns in /lib
 > sed -e '/ -> \/lib/!d' -e 's/ -> .*//' -e 's/.* //' \
 >   -e 's/\.so/*&/' -e 's%^%ls /lib/%' | sh
 /lib/libBrokenLocale-2.1.1.so
 /lib/libcrypt-2.1.1.so
 /lib/libdb-2.1.1.so
 /lib/libdb1-2.1.1.so
 /lib/libdl-2.1.1.so
 /lib/libm-2.1.1.so
 /lib/libnsl-2.1.1.so
 /lib/libnss_compat-2.1.1.so
 /lib/libnss_db-2.1.1.so
 /lib/libnss_dns-2.1.1.so
 /lib/libnss_files-2.1.1.so
 /lib/libnss_nis-2.1.1.so
 /lib/libnss_nisplus-2.1.1.so
 /lib/libpthread-0.8.so
 /lib/libresolv-2.1.1.so
 /lib/libutil-2.1.1.so

dpkg -S for the replacements seems to implicate a libc6 upgrade:

 $ cd /usr/lib ; ls -lL | sed -e '/ -> \/lib/!d' -e 's/ -> .*//' -e 's/.* //' \
 >   -e 's/\.so/*&/' -e 's%^%ls /lib/%' | sh | xargs dpkg -S
 libc6: /lib/libBrokenLocale-2.1.1.so
 libc6: /lib/libcrypt-2.1.1.so
 libc6: /lib/libdb-2.1.1.so
 libc6: /lib/libdb1-2.1.1.so
 libc6: /lib/libdl-2.1.1.so
 libc6: /lib/libm-2.1.1.so
 libc6: /lib/libnsl-2.1.1.so
 libc6: /lib/libnss_compat-2.1.1.so
 libc6: /lib/libnss_db-2.1.1.so
 libc6: /lib/libnss_dns-2.1.1.so
 libc6: /lib/libnss_files-2.1.1.so
 libc6: /lib/libnss_nis-2.1.1.so
 libc6: /lib/libnss_nisplus-2.1.1.so
 libc6: /lib/libpthread-0.8.so
 libc6: /lib/libresolv-2.1.1.so
 libc6: /lib/libutil-2.1.1.so

libc6_2.1.1-12.deb appears to have been installed on July 2nd here.
(Rephrase without passive: +I+ seem to have installed it.) The older
package has been renamed to libc6_2.0.7.19981211-6.deb but has a time
stamp of March 30, which seems more likely. (I might have downloaded
it in December, and finally gotten around to finding I needed it in
March. I work on this system when I have the time, and basically just
need it to run Emacs and Perl. I guess I got X running around March.)

Here's dpkg -S for the broken links:

 $ ls -lL /usr/lib | sed -e '/ -> \/lib/!d' -e 's/ -> .*//' -e 's/.* //' \
 >  -e 's%^%/usr/lib/%' | xargs dpkg -S
 libc6-dev: /usr/lib/libBrokenLocale.so
 libc6-dev: /usr/lib/libcrypt.so
 libc6-dev: /usr/lib/libdb.so
 libc6-dev: /usr/lib/libdl.so
 libc6-dev: /usr/lib/libm.so
 libc6-dev: /usr/lib/libnsl.so
 libc6-dev: /usr/lib/libnss_compat.so
 libc6-dev: /usr/lib/libnss_db.so
 libc6-dev: /usr/lib/libnss_dns.so
 libc6-dev: /usr/lib/libnss_files.so
 libc6-dev: /usr/lib/libnss_nis.so
 libc6-dev: /usr/lib/libpthread.so
 libc6-dev: /usr/lib/libresolv.so
 libc6-dev: /usr/lib/libutil.so

So it appears that these actual links were installed by libc6-dev and
never got updated when newer packages updated the corresponding
libraries in /lib.

I seem to have installed libc6-dev on June 15th.

 $ dpkg -s libc6-dev
 Package: libc6-dev
 Status: install ok installed
 Priority: standard
 Section: devel
 Installed-Size: 4841
 Maintainer: Dale Scheetz <dwarf@polaris.net>
 Source: glibc
 Version: 2.0.7t-1
 Replaces: ldso (<< 1.9.0-0), man-db (<= 2.3.10-41), gettext (<= 0.10.26-1), ppp (<= 2.2.0f-24), libgdbmg1-dev (<= 1.7.3-24)
 Provides: libc-dev
 Depends: libc6 (= 2.0.7t-1), gcc (>= 2.7.2.3-1)
 Conflicts: libc-dev, libdl1-dev, libdb1-dev, libgdbm1-dev, libpthread0-dev
 Description: The GNU C library version 2 (development files).
  Includes libc headers, kernel headers and static libraries.

Unfortunately, I suspected libc6-dev at this point, and went ahead and
upgraded it. In the process, I also upgraded to ldso_1.9.11-3 -- from
1.9.9-1 -- and libc6_2.1.2-2 and that certainly fixed the problem. But
I didn't have the sense to check whether the upgrade of libc6 alone
would have fixed this. Grumble.

Now I'm installing a replacement for libdb2 just to see what happens
... hummm, yes: upgrading to libdb2_2.4.14-5.deb updates the link,
too.

Sorry if I'm wasting your time with this,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition


Reply to: