Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

/usr/lib/dld.sl: Can't open shared library:

Sivaji
Occasional Contributor

/usr/lib/dld.sl: Can't open shared library:

I received the following error when trying to execute a Pro*C program on HP-UX 11.0.

/usr/lib/dld.sl: Can't open shared library: /opt/dev6i/lib//libclntsh.sl.1.0
/usr/lib/dld.sl: No such file or directory

This program is compiled on another machine which is also running on HP-UX 11.0.
The difference between these machines is ORACLE_HOME path.
The ORACLE_HOME is /opt/oracle/product/dev6i where I am executing the program.
The ORACLE_HOME is /opt/dev6i where the program is compiled.
12 REPLIES
harry d brown jr
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Set SHLIB_PATH and LD_LIBRARY_PATH

live free or die
harry
Live Free or Die
Pete Randall
Outstanding Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Welcome back, Harry. Vacation?

Pete

Pete
harry d brown jr
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Pete,

A couple of days off, plus a lot of work finishing up a white paper.

live free or die
harry
Live Free or Die
Sivaji
Occasional Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

I have set the path as below in both the servers, but still getting same error.
export SHLIB_PATH=/opt/oracle/product/dev6i
export LD_LIBRARY_PATH=/opt/oracle/product/dev6i
H.Merijn Brand (procura
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Wrong:

export SHLIB_PATH=/opt/oracle/product/dev6i/lib
export LD_LIBRARY_PATH=/opt/oracle/product/dev6i/lib

And check if you've got the correct access rights
Enjoy, Have FUN! H.Merijn
Sivaji
Occasional Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Same error.
The files have below access rights
rwxr-xr-x 1 oracle dba
Ryan Kogelheide
Frequent Advisor

Re: /usr/lib/dld.sl: Can't open shared library:

Sorry if it's a dumb remark, but shouldn't

/opt/dev6i/lib//libclntsh.sl.1.0

read:

/opt/dev6i/lib/libclntsh.sl.1.0

?

or does dld do this all the time?
H.Merijn Brand (procura
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Does "/opt/dev6i/lib/" exist? Or did you expect it to be the same as "/opt/oracle/product/dev6i/lib"?

Otherwise try this:

# cd /opt
# ln -s oracle/product/dev6i dev6i

Should help
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Ryan, no, that's a problem caused by Oracle's way of linking, and does not harm.

Unix (HP-UX) ignores multiple consequetive slashes

# cd ////////////////////tmp

is identical to

# cd /tmp
Enjoy, Have FUN! H.Merijn
Markus Bonet
Advisor

Re: /usr/lib/dld.sl: Can't open shared library:

Hi!

I had a similar problem.
The 2 '/' won't be a problem, though it looks awful.

Try 'ldd' on that lib.
It will tell you if there are any dependencies to that lib.
In my case there was a right missing on a lib in Oracle->libs. Beware to use the same user as the one with wich the error occurs when running 'ldd'.


Tell me if it helped, Markus
Duncan Edmonstone
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

Sivaji,

Unless you are very careful when compiling/linking code on HPUX, the shared library path search doesn't get enabled (i.e. SHLIB_PATH gets ignored). There's a good reason for this - security - you don't want someone replacing you shared library with a trojan horse!

The good news is you can change this beahviour without having to rebuild the executable, using the chatr command.

First check whether SHLIB_PATH is being used:

chatr

ANd llok near the top of the output - there will be a line whcih tells you whether the SHLIB_PATH searching is enabled or not.

If its not, to change it run:

chatr +s enable

Then set your SHLIB_PATH, export it, and all should be well.

HTH

Duncan

HTH

Duncan
Brian Crabtree
Honored Contributor

Re: /usr/lib/dld.sl: Can't open shared library:

One thing to try is to regenerate your libclntsh file.

You should be able to do this by setting your enviroment, and then going to $ORACLE_HOME/bin. There should be a genclntsh file there. The database (if this is an RDBMS server) will need to be down. You can relink it. After that, make sure that your enviroment is set correctly, with the SHLIB_PATH set, and see if that works.

Brian