0

For some reason, all (or very many) shared libraries no longer load. However, ldconfig claims that the library exists.

web6:~ # sendmail -?
sendmail: error while loading shared libraries: libdb-4.8.so: cannot open shared object file: No such file or directory
web6:~ # ldconfig -v | grep libdb-4.8
        libdb-4.8.so -> libdb-4.8.so
web6:~ # sendmail -?
sendmail: error while loading shared libraries: libdb-4.8.so: cannot open shared object file: No such file or directory
web6:~ # zypper -?
zypper: error while loading shared libraries: libmodman.so.1: cannot open shared object file: No such file or directory
web6:~ # rpm -qa | grep libdb-
    libdb-4_8-4.8.30-17.1.4.x86_64
    libdb-4_8-32bit-4.8.30-17.1.4.x86_64
web6:~ #

Any suggestions as to what could be happening?

This affects many programs, although Apache2 is still OK. I discovered this when a user said that contact form were no longer emailing submissions.

LD_DEBUG=libs sendmail -?
          1927:     find library=libresolv.so.2 [0]; searching
          1927:      search cache=/etc/ld.so.cache
          1927:       trying file=/lib64/libresolv.so.2
          1927:
          1927:     find library=libnsl.so.1 [0]; searching
          1927:      search cache=/etc/ld.so.cache
          1927:       trying file=/lib64/libnsl.so.1
          1927:
          1927:     find library=libcrypt.so.1 [0]; searching
          1927:      search cache=/etc/ld.so.cache
          1927:       trying file=/lib64/libcrypt.so.1
          1927:
          1927:     find library=libm.so.6 [0]; searching
          1927:      search cache=/etc/ld.so.cache
          1927:       trying file=/lib64/libm.so.6
          1927:
          1927:     find library=libdb-4.8.so [0]; searching
          1927:      search cache=/etc/ld.so.cache
          1927:      search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64     (system search path)
          1927:       trying file=/lib64/tls/x86_64/libdb-4.8.so
          1927:       trying file=/lib64/tls/libdb-4.8.so
          1927:       trying file=/lib64/x86_64/libdb-4.8.so
          1927:       trying file=/lib64/libdb-4.8.so
          1927:       trying file=/usr/lib64/tls/x86_64/libdb-4.8.so
          1927:       trying file=/usr/lib64/tls/libdb-4.8.so
          1927:       trying file=/usr/lib64/x86_64/libdb-4.8.so
          1927:       trying file=/usr/lib64/libdb-4.8.so
          1927:
sendmail: error while loading shared libraries: libdb-4.8.so: cannot open shared object file: No such file or directory
bendodge
  • 156
  • 9
  • if your library are really there, you can try to use something like this: `LD_DEBUG=libs sendmail -?` what did you do before this started to happen? – c4f4t0r Jan 21 '15 at 22:35
  • Our webmaster notified me in Jan that it started happening Dec 3. I glanced through my notes, and the only thing that happened around that time was a reboot and fsck to fix an ext4 journal lock (occasional problem on VMWare instances of ext4; lots written about it online). I'll put the output of `LD_DEBUG=libs sendmail -?` in the OP. – bendodge Jan 21 '15 at 22:44

1 Answers1

1

Here is the key:

sendmail: error while loading shared libraries: libdb-4.8.so: cannot open shared object file: No such file or directory

Your libdb-4.8.so is missing. It is probably the result of a failed upgrade, or a disk damage. You should reinstall its containing package (in your case I used scout or some rpm command to find out, to which package belongs it and then reinstalled this package).

Your other libraries are probably correct - only if a library depends on another (this time, on libdb), and this dependency is damaged, then it won't also load in.

If really a lot of missing/damaged libs you had on your system, it were probably unbootable.

If it really won't work (f.e. some of rpm or the install scripts also want one of the missing libraries), you could copy it back manually, too. Of course, in this case you should do a regular reinstall of that package, too, such patched solution are valid only as a temporarily.

peterh
  • 4,953
  • 13
  • 30
  • 44
  • 1
    Knowing that the system would not boot if all/many libraries were missing was very helpful. There were a handful of missing libraries, including one (libmodman) that broke zypper. I was able to use the HTTPS repositories to download the packages to my computer, upload them to the server via SCP, and then install them with `rpm --replacepkgs`. Many thanks! – bendodge Jan 23 '15 at 15:38