Sam Carleton writes:
Maildrop is have problems running on my Solaris 8 mail server. The mail
server is qmail and maildrop is being placed into the .qmail file of the
user. Qmail logs this:
delivery 455: deferral:
ld.so.1:_/usr/local/bin/maildrop:_fatal:_libstdc++.so.2.10.0:_open_failed:_No_such_file_or_directory/
Someone on the qmail mailing list enlightened me to ldd. when I do a
ldd on maildrop, this is what I get::
# ldd /usr/local/bin/maildrop
libstdc++.so.2.10.0 => /usr/local/lib/libstdc++.so.2.10.0
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
I am totally lost at this point; if I understand ldd correctly, it is
saying that it is looking in /usr/local/lib for the c++ library, which
is where that library is located. Why cann't maildrop find it?
When maildrop is invoked from the .qmail files, the maildrop process
inherits the environment from its parent process, qmail-local.
The answer is that qmail-local's environment is not the same as your shell
environment, and whatever the difference is, is why the reference to this
shared library can be resolved from shell's environment.
You probably have LD_LIBRARY_PATH initialized in your shell environment,
but not in qmail-local's environment.