Operating System - HP-UX
1751974 Members
4785 Online
108784 Solutions
New Discussion юеВ

Can't find path for shared library: libcrypto.sl.0.9.8

 

Can't find path for shared library: libcrypto.sl.0.9.8

The application that we run on our hpux rp7410 box just had a major release getting the application ready for the upgrade to hpux 11v2.

In the release they moved to Apache 2.0.55, OpenSSL 0.9.8 and OpenLDAP 2.3.20. They don't use the bundled/depot version HP has for download. :-(

So after much tweaking we got the install scripts to work and install everything and apache server is working.

We do have a problem with cron jobs that stop/start apache or rebuild the athdb fail and the change password web page that uses perl to call htdbm.

They get this error: /usr/lib/dld.sl: Can't find path for shared library: libcrypto.sl.0.9.8

I added a symlink in /usr/lib to libcrypto.sl.0.9.8, but that made no difference (/opt/openssl098/lib/libcrypto.sl.0.9.8). I even make a copy of the file and replaced the symlink with the file, no change.

Does anyone have any ideas?
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: Can't find path for shared library: libcrypto.sl.0.9.8

Does the error occur at the beginning or the middle of the process?

If the former, can you use ldd on the executable, that may give more info.
Victor Fridyev
Honored Contributor

Re: Can't find path for shared library: libcrypto.sl.0.9.8

Please check whether all dependencies in time of installation are satisfied.
If this is true, run
#>chatr executable
and look for path of libcrypto.
Copy or link the file to the requested place and try to rerun the program.

HTH
Entities are not to be multiplied beyond necessity - RTFM
H.Merijn Brand (procura
Honored Contributor

Re: Can't find path for shared library: libcrypto.sl.0.9.8

32bit or 64bit?

If you (sym)link a 32bit shared lib to the location where the executable tries to find it, but the executable is 64bit, it will not find it.

# chatr executable

and

# ldd executable

will tell you what it looks for and what it finds

play with $SHLIB_PATH and $LD_LIBRARY_PATH and check if what it looks for (incl architecture) matches in a location where it can be found.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn

Re: Can't find path for shared library: libcrypto.sl.0.9.8

We have noticed it on two Apache 2.0 processes so far. Apachectl (/opt/apache2/bin/apachectl) is run in root's cron to stop/start hpptd at certain times during the week. The other is in a perl script that uses htdbm (/opt/apache2/bin/htdbm) to allow the users to change their password.

When I do chatr & ldd on apachectl I get error message, but get output for htdbm. To me it looks like htdbm know where libcrypto.sl.0.9.8 is (/opt/openssl098/lib/libcrypto.sl.0.9.8). I'm I reading the output incorrectly? I'm wondering if somehow openssl, apache or openldap got compiled in 32-bit rather then 64-bit as the OS is. Is there a way to tell whether these apps are 32-bit or 64-bit?

When I do the chatr & ldd on apachectl I get the following errors:

/usr/ccs/bin/ldd -v /opt/apache2/bin/apachectl | more
"/home/carsids/adamski/.redo" 1 line, 55 characters
ldd: Invalid file type: "/opt/apache2/bin/apachectl". Shared executable or shared library expected.

chatr /opt/apache2/bin/apachectl | more
"/home/carsids/adamski/.redo" 1 line, 41 characters
chatr(error): chatr cannot recognize file type of file /opt/apache2/bin/apachectl

When I do the chatr & ldd on htdbm I get the following information:



chatr /opt/apache2/bin/htdbm

/opt/apache2/bin/htdbm:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path enabled first /opt/apache2/lib:/opt/openldap/lib
shared library list:
dynamic /usr/lib/libpthread.1
static /opt/apache2/lib/libaprutil-0.sl.9
dynamic /opt/openssl098/lib/libcrypto.sl.0.9.8
dynamic /usr/lib/libc.2
static /opt/openldap/lib/libdb-4.3.sl
static /opt/apache2/lib/libexpat.sl.1
static /opt/apache2/lib/libapr-0.sl.9
dynamic /opt/openssl098/lib/libssl.sl.0.9.8
static /opt/openldap/lib/libsasl2.sl.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libnsl.1
dynamic /usr/lib/libdld.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
explicit unloading enabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled

/usr/ccs/bin/ldd -v /opt/apache2/bin/htdbm


find library=/usr/lib/libdld.2; required by /opt/apache2/bin/htdbm
/usr/lib/libdld.2 => /usr/lib/libdld.2

find library=/usr/lib/libc.2; required by implicit load
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/usr/lib/libdld.2; required by /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2

find library=/usr/lib/libnsl.1; required by /opt/apache2/bin/htdbm
/usr/lib/libnsl.1 => /usr/lib/libnsl.1

find library=/usr/lib/libxti.2; required by /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2

find library=/usr/lib/libm.2; required by /opt/apache2/bin/htdbm
/usr/lib/libm.2 => /usr/lib/libm.2

find library=/opt/openldap/lib/libsasl2.sl.2; required by /opt/apache2/bin/htdbm
/opt/openldap/lib/libsasl2.sl.2 => /opt/openldap/lib/libsasl2.sl.2

find library=/opt/openssl098/lib/libssl.sl.0.9.8; required by /opt/apache2/bin/htdbm
/opt/openssl098/lib/libssl.sl.0.9.8 => /opt/openssl098/lib/libssl.sl.0.9.8

find library=/usr/lib/libdld.2; required by /opt/openssl098/lib/libssl.sl.0.9.8
/usr/lib/libdld.2 => /usr/lib/libdld.2

find library=./libcrypto.sl.0.9.8; required by /opt/openssl098/lib/libssl.sl.0.9.8
./libcrypto.sl.0.9.8 => /opt/openssl098/lib/libcrypto.sl.0.9.8

find library=/usr/lib/libdld.2; required by /opt/openssl098/lib/libcrypto.sl.0.9.8
/usr/lib/libdld.2 => /usr/lib/libdld.2

find library=/opt/apache2/lib/libapr-0.sl.9; required by /opt/apache2/bin/htdbm
/opt/apache2/lib/libapr-0.sl.9 => /opt/apache2/lib/libapr-0.sl.9

find library=/usr/lib/libc.2; required by /opt/apache2/lib/libapr-0.sl.9
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/usr/lib/libdld.2; required by /opt/apache2/lib/libapr-0.sl.9
/usr/lib/libdld.2 => /usr/lib/libdld.2

find library=/usr/lib/libpthread.1; required by /opt/apache2/lib/libapr-0.sl.9
/usr/lib/libpthread.1 => /usr/lib/libpthread.1

find library=/usr/lib/libnsl.1; required by /opt/apache2/lib/libapr-0.sl.9
/usr/lib/libnsl.1 => /usr/lib/libnsl.1

find library=/usr/lib/libm.2; required by /opt/apache2/lib/libapr-0.sl.9
/usr/lib/libm.2 => /usr/lib/libm.2

find library=/opt/openldap/lib/libsasl2.sl.2; required by /opt/apache2/lib/libapr-0.sl.9
/opt/openldap/lib/libsasl2.sl.2 => /opt/openldap/lib/libsasl2.sl.2

find library=/opt/openssl098/lib/libssl.sl.0.9.8; required by /opt/apache2/lib/libapr-0.sl.9
/opt/openssl098/lib/libssl.sl.0.9.8 => /opt/openssl098/lib/libssl.sl.0.9.8

find library=/opt/apache2/lib/libexpat.sl.1; required by /opt/apache2/bin/htdbm
/opt/apache2/lib/libexpat.sl.1 => /opt/apache2/lib/libexpat.sl.1

find library=/usr/lib/libc.2; required by /opt/apache2/lib/libexpat.sl.1
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/opt/openldap/lib/libdb-4.3.sl; required by /opt/apache2/bin/htdbm
/opt/openldap/lib/libdb-4.3.sl => /opt/openldap/lib/libdb-4.3.sl

find library=/usr/lib/libc.2; required by /opt/openldap/lib/libdb-4.3.sl
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/usr/lib/libc.2; required by /opt/apache2/bin/htdbm
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/opt/openssl098/lib/libcrypto.sl.0.9.8; required by /opt/apache2/bin/htdbm
/opt/openssl098/lib/libcrypto.sl.0.9.8 => /opt/openssl098/lib/libcrypto.sl.0.9.8

find library=/opt/apache2/lib/libaprutil-0.sl.9; required by /opt/apache2/bin/htdbm
/opt/apache2/lib/libaprutil-0.sl.9 => /opt/apache2/lib/libaprutil-0.sl.9

find library=/usr/lib/libc.2; required by /opt/apache2/lib/libaprutil-0.sl.9
/usr/lib/libc.2 => /usr/lib/libc.2

find library=/usr/lib/libpthread.1; required by /opt/apache2/bin/htdbm
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
H.Merijn Brand (procura
Honored Contributor

Re: Can't find path for shared library: libcrypto.sl.0.9.8

Your apache is most likely 32bit. Use 'file' to check that.

The 'perl' it invokes is probably 64bit.
That is harder to check, as the perl *you* see might not be the same apache sees, as the $PATH environment may change.

32bit perl and 64bit perl can happily live side by side, but they cannot use eachothers libraries and XS modules.

# perl -v

will show you the basic config, but the output of the file command on both apache and perl should match.

/opt/apache/bin 107 > file *
ab: PA-RISC1.1 shared executable dynamically linked
apachectl: (Bourne-)shell script
apxs: ascii text
certmig: PA-RISC1.1 shared executable dynamically linked -not stripped
checkgid: PA-RISC1.1 shared executable dynamically linked
chroot_os_cp.sh: commands text
dbmmanage: ascii text
htdigest: PA-RISC1.1 shared executable dynamically linked
htpasswd: PA-RISC1.1 shared executable dynamically linked
httpd: PA-RISC1.1 shared executable dynamically linked -not stripped
logresolve: PA-RISC1.1 shared executable dynamically linked
mkcert.sh: (Bourne-)shell script
rotatelogs: PA-RISC1.1 shared executable dynamically linked
stunnel_ctl.sh: (Bourne-)shell script

That means *for sure* it is 32bit, as pa-1.1 does not support 64bit. This product wa built with +DApotable or some equivalent option.

/opt/perl64/bin 109 > file perl
perl: ELF-64 executable object file - PA-RISC 2.0 (LP64)

ELF-64 and LP64 both indicate 64bit builds

/opt/perl/bin 112 > file perl
perl: PA-RISC2.0 shared executable dynamically linked -not stripped

This is the 32bit build

/usr/local/ssl/lib 121 > file *
engines: directory
libcrypto-0.9.8.sl: PA-RISC2.0 shared library -not stripped
libcrypto-0.9.8d.a: archive file -PA-RISC2.0 relocatable library
libcrypto-0.9.8d.sl: PA-RISC2.0 shared library -not stripped
libcrypto.a: archive file -PA-RISC2.0 relocatable library
libcrypto.sl.0.9.8: PA-RISC2.0 shared library -not stripped
libssl-0.9.8.sl: PA-RISC2.0 shared library -not stripped
libssl-0.9.8d.a: archive file -PA-RISC2.0 relocatable library
libssl-0.9.8d.sl: PA-RISC2.0 shared library -not stripped
libssl.a: archive file -PA-RISC2.0 relocatable library
libssl.sl: PA-RISC2.0 shared library -not stripped
libssl.sl.0.9.8: PA-RISC2.0 shared library -not stripped
pkgconfig: directory

and my OpenSSL libraries are 32bit

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn

Re: Can't find path for shared library: libcrypto.sl.0.9.8

Well looks like everything is 32bit, so thats not the cause. :-(

adamski cars# perl -v

This is perl, v5.8.8 built for PA-RISC2.0-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

adamski cars# cd /opt/apache2/bin
adamski cars# file *
ab: PA-RISC1.1 shared executable dynamically linked -not stripped
apachectl: commands text
apr-config: commands text
apu-config: commands text
apxs: ascii text
checkgid: PA-RISC1.1 shared executable dynamically linked -not stripped
dbmmanage: ascii text
envvars: ascii text
envvars-std: ascii text
htdbm: PA-RISC1.1 shared executable dynamically linked -not stripped
htdigest: PA-RISC1.1 shared executable dynamically linked -not stripped
htpasswd: PA-RISC1.1 shared executable dynamically linked -not stripped
httpd: PA-RISC1.1 shared executable dynamically linked -not stripped
logresolve: PA-RISC1.1 shared executable dynamically linked -not stripped
rotatelogs: PA-RISC1.1 shared executable dynamically linked -not stripped

adamski cars# cd /opt/perl58/bin
adamski cars# file perl
perl: PA-RISC2.0 shared executable dynamically linked -not stripped

adamski cars# cd /opt/openssl098/bin
adamski cars# file *
c_rehash: ascii text
openssl: PA-RISC2.0 shared executable dynamically linked -not stripped

adamski cars# cd /opt/openldap/bin
adamski cars# file *
db_archive: PA-RISC1.1 shared executable dynamically linked
db_checkpoint: PA-RISC1.1 shared executable dynamically linked
db_deadlock: PA-RISC1.1 shared executable dynamically linked
db_dump: PA-RISC1.1 shared executable dynamically linked
db_load: PA-RISC1.1 shared executable dynamically linked
db_printlog: PA-RISC1.1 shared executable dynamically linked
db_recover: PA-RISC1.1 shared executable dynamically linked
db_stat: PA-RISC1.1 shared executable dynamically linked
db_upgrade: PA-RISC1.1 shared executable dynamically linked
db_verify: PA-RISC1.1 shared executable dynamically linked
ldapadd: PA-RISC2.0 shared executable dynamically linked
ldapcompare: PA-RISC2.0 shared executable dynamically linked
ldapdelete: PA-RISC2.0 shared executable dynamically linked
ldapmodify: PA-RISC2.0 shared executable dynamically linked
ldapmodrdn: PA-RISC2.0 shared executable dynamically linked
ldappasswd: PA-RISC2.0 shared executable dynamically linked
ldapsearch: PA-RISC2.0 shared executable dynamically linked
ldapwhoami: PA-RISC2.0 shared executable dynamically linked
adamski cars#
Dennis Handly
Acclaimed Contributor

Re: Can't find path for shared library: libcrypto.sl.0.9.8

apachectl seems to be a script (procura shows that) and not an executable, that's why ldd/chatr doesn't like it. So if it invokes htdbm, we have that info.

Strangely your ldd on htdbm shows it finding ibcrypto.sl.0.9.8. Perhaps perl is messing up SHLIB_PATH when it invokes apachectl?

What version of dld do you have? Newer versions of dld will NOT honor SHLIB_PATH if running as root. Though putting that link in /usr/lib/ should have fixed that.

Hmm, your symptoms seem to match CR JAGag16003:
/usr/lib/dld.sl: Can't find path for shared

This is fixed in:
PHSS_35378 061006 'ld(1) and linker tools cumulative patch' 11.00
PHSS_35379 061006 'ld(1) and linker tools cumulative patch' 11.11

Re: Can't find path for shared library: libcrypto.sl.0.9.8

Ok found at least 2 fixes for the problems witht he libraries.

To fix the perl issue, added



#
# Pass the shared library path environment variable to all
# CGI scripts. This allows CGI scripts using Crypt::SSLeay to find
# the OpenSSL library.
#
PassEnv SHARED_LIB_VAR


to the httpd.conf file and bounced apache and things started to work. For the script apachectl called in cron had to add SHLIB_PATH in the cron line. First defining it then exporting it. see below in the cron line we tested with.


55 13,23 * * * HOME=/home/carsids/carsroot; LOGNAME=carsroot; USER=carsroot; PAT
H=.:/opt/carsi/install/cis:/bin:/usr/bin:/usr/ucb:/usr/local/bin:/opt/carsi/inst
all/utl:/opt/informix/bin:/opt/carsi/install/bin:/etc/opt/gnu/bin:/opt/perl58/bi
n; CARSV=carsi; CARSPATH=/opt/carsi; CISCPATH=/opt/carsi; INFORMIXDIR=/opt/infor
mix; INFORMIXSERVER=leto; ONCONFIG=onconf.cars; CARSDB=cars; SHLIB_PATH=/opt/inf
ormix/lib:/opt/informix/lib/tools:/opt/informix/lib/esql:/opt/openssl098/lib:/us
r/lib; export HOME LOGNAME USER PATH CARSV CARSPATH CISCPATH INFORMIXDIR INFORMI
XSERVER ONCONFIG CARSDB SHLIB_PATH; /opt/carsi/install/cis/setup_web_dbm ia LIVE
1> /home/carsids/carsroot/ia.out 2> /home/carsids/carsroot/ia.err

I will look into PHSS_35379 as not sure we have everything working. I just did a patch assessment, but might have missed it.

Thanks to everyone that replied it helped a lot in resolving the problems.

John
Dennis Handly
Acclaimed Contributor

Re: Can't find path for shared library: libcrypto.sl.0.9.8

>Thanks to everyone that replied it helped a lot in resolving the problems.

If our answers were helpful, you should assign points:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28