Perl module not finding .so file on system startup

L

Larry

I have a Perl script that runs during system startup on a Solaris
system. The script is working fine during starup on many machines,
except on one machine it fails complaining about a missing ".so" file,
with Perl flagging the "use" line for the module. (I don't have the
exact message since I'm heard about it from a remote sysadmin who only
saw it scroll by on the console). However, if I login as root on that
machine and run the Perl script, it works fine.

I'm thinking there must be some difference in the environment present
at system startup, versus at an interactive shell, which is causing it
to find the .so file when run interactively, but not during startup.
Perhaps it's related to the LD_LIBRARY_PATH variable? I noticed that
the LD_LIBRARY_PATH *is* set for my interactive root shell, but I'm
not sure what it's set to (if anything) during system startup.

In case it matters, the module that's failing is DBD::DB2.
 
I

it_says_BALLS_on_your forehead

Larry said:
Sorry it was not clear to you. The question would be "How can I stop
the script from failing"?

it would help if you had the exact error message. if the error message
told you where it was expecting the file, you could just copy it there.

also, have you compared the paths, etc. on a machine that works versus
the one that does not?
 
J

J. Gleixner

Larry said:
Sorry it was not clear to you. The question would be "How can I stop
the script from failing"?

First, show us the exact error, it's too general to give a specific
answer. Possibly, a filesystem isn't mounted yet, or different
versions of perl are being used at start-up, compared to the shell.
It's really tough to tell without being able to re-create it though.
If it is the LD_LIBRARY_PATH, you could set that in your script,
so it doesn't depend on the current environment.
 
J

Joe Smith

Larry said:
I have a Perl script that runs during system startup on a Solaris system.
except on one machine it fails complaining about a missing ".so" file,

Are you invoking it after all the other required things?
Try using 99, as in /etc/rc3.d/S99mystartupscript.
Perhaps it's related to the LD_LIBRARY_PATH variable?

Most likely.
-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top