MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
December
Sun Mon Tue Wed Thu Fri Sat
   
15
   
2009
Months
Dec


Tue, Dec 15, 2009 2:27 pm

Open Failed for libssl.so.0.9.8

When I tried restarting ELOG from a user account on a Solaris 7 system, I received the following error:
bash-2.03$ /usr/local/bin/elogd -c /home/elog/elogd.cfg -d /home/elog/logbooks -n localhost -D
ld.so.1: /usr/local/bin/elogd: fatal: libssl.so.0.9.8: open failed: No such file
 or directory

I had been running the program before without a problem, so I looked for libssl.so.0.9.8. It was present on the system.

bash-2.03$ find / -name libssl.so.0.9.8 -print 2>/dev/null
/usr/local/ssl/lib/libssl.so.0.9.8
# ls -l /usr/local/ssl/lib
total 8950
drwxr-xr-x   2 bin      bin          512 Jun 22 15:46 engines
-r--r--r--   1 bin      bin         5396 Mar 29  2009 fips_premain.c
-r--r--r--   1 bin      bin           68 Mar 29  2009 fips_premain.c.sha1
-rw-r--r--   1 bin      bin      2263212 Mar 29  2009 libcrypto.a
lrwxrwxrwx   1 root     other         18 Oct 16  2007 libcrypto.so -> libcrypto.
so.0.9.8
-r-xr-xr-x   1 bin      bin      1525564 Mar 29  2009 libcrypto.so.0.9.8
-rw-r--r--   1 bin      bin       416204 Mar 29  2009 libssl.a
lrwxrwxrwx   1 root     other         15 Oct 16  2007 libssl.so -> libssl.so.0.9
.8
-r-xr-xr-x   1 bin      bin       313176 Mar 29  2009 libssl.so.0.9.8
drwxr-xr-x   2 bin      bin          512 Jun 22 15:46 pkgconfig

So I checked to see what libraries elogd was using with the ldd command.

bash-2.03$ ldd /usr/local/bin/elogd
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libssl.so.0.9.8 =>       (file not found)
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1

So I then logged into the root account and checked the elogd file with the ldd command from that account.

bash-2.03$ su - root
Password:
Sun Microsystems Inc.   SunOS 5.7       Generic October 1998
# ldd /usr/local/bin/elogd
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libssl.so.0.9.8 =>       /usr/local/ssl/lib/libssl.so.0.9.8
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libcrypto.so.0.9.8 =>    /usr/local/ssl/lib/libcrypto.so.0.9.8
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1

From that account, I did not see "file not found" for libssl.so.0.9.8.

At an FAQ page on the Electrical and Computer Engineering Department website for the University of Toronto I found the following advice:

Q. When I try to run "svn" on Solaris, I get the error:
ld.so.1: svn: fatal: libssl.so.0.9.8: open failed: No such file or directory
Killed
How can I get svn to work on Solaris?

A. Add /local/openssl-0.9.8a/lib to the LD_LIBRARY_PATH env var before you \start:
i.e., setenv LD_LIBRARY_PATH /local/openssl-0.9.8a/lib

I checked the LD_LIBRARY_PATH setting for the root command.

# echo $LD_LIBRARY_PATH
/usr/lib:/usr/local/lib:/usr/local/ssl/lib

I then checked the value for the variable for the user account.

bash-2.03$ echo $LD_LIBRARY_PATH

bash-2.03$

On Solaris systems, you can use the -s option to show the full library search path.

bash-2.03$ ldd -s /usr/local/bin/elogd

   find object=libsocket.so.1; required by /usr/local/bin/elogd
    search path=/usr/lib  (default)
    trying path=/usr/lib/libsocket.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1

   find object=libnsl.so.1; required by /usr/local/bin/elogd
    search path=/usr/lib  (default)
    trying path=/usr/lib/libnsl.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1

   find object=libssl.so.0.9.8; required by /usr/local/bin/elogd
    search path=/usr/lib  (default)
    trying path=/usr/lib/libssl.so.0.9.8
        libssl.so.0.9.8 =>       (file not found)

   find object=libc.so.1; required by /usr/local/bin/elogd
    search path=/usr/lib  (default)
    trying path=/usr/lib/libc.so.1
        libc.so.1 =>     /usr/lib/libc.so.1

   find object=libnsl.so.1; required by /usr/lib/libsocket.so.1

   find object=libc.so.1; required by /usr/lib/libsocket.so.1

   find object=libdl.so.1; required by /usr/lib/libnsl.so.1
    search path=/usr/lib  (default)
    trying path=/usr/lib/libdl.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1

   find object=libc.so.1; required by /usr/lib/libnsl.so.1

   find object=libmp.so.2; required by /usr/lib/libnsl.so.1
    search path=/usr/lib  (default)
    trying path=/usr/lib/libmp.so.2
        libmp.so.2 =>    /usr/lib/libmp.so.2

   find object=libdl.so.1; required by /usr/lib/libc.so.1

   find object=libc.so.1; required by /usr/lib/libmp.so.2

   find object=/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1; required by /usr/lib/libc.so.1
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
bash-2.03$

So, when attempting to run elogd from the user account, the system was only checking /usr/lib for libssl.so.0.9.8. Since the file wasn't in that location, I got the "fatal: libssl.so.0.9.8: open failed: No such file or directory" message. So, though I thought I had been running the program from that user account, I must have always previously been running it from the root account, since I didn't ever see the error message before when running elogd.

So, while logged into the user account, I set LD_LIBRARY_PATH to /usr/local/ssl/lib. I was then able to run elogd from the user account without an error message appearing.

bash-2.03$ LD_LIBRARY_PATH=/usr/local/ssl/lib
bash-2.03$ export LD_LIBRARY_PATH
bash-2.03$ /usr/local/bin/elogd -c /home/elog/elogd.cfg -d /home/elog/logbooks -
n localhost -D
bash-2.03$ ps -ef | grep elogd | grep -v grep
jsmith  7961     1  0 14:13:05 ?        0:00 /usr/local/bin/elogd -c /home/elog/
elogd.cfg -d /home/elog/logbooks -n localhos

References:

  1. Blastwave Packages
    Date: January 25, 2008
    Joyent Wiki
  2. When I try to run "svn" on Solaris, I get the error: ld.so.1: svn: fatal: libssl.so.0.9.8: open failed: No such file or directory Killed
    Eugenia's Home Page
  3. Obtaining a List of the Libraries Required by a Program
    MoonPoint Support

[/os/unix/solaris] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo