ianlau has asked for the wisdom of the Perl Monks concerning the following question:
Hi, anyone can guide me on fixing the following file not found problem ? I got it when loading:
use Sybase::DBlib;
Can't load '/opt/perl/5.6.0/lib/site_perl/5.6.0/sun4-solaris/auto/Sybase/DBlib/DBlib.so' for module Sybase::DBlib: ld.so.1: test.pl: fatal: libsybdb.so: open failed: No such file or directory at /opt/perl/5.6.0/lib/5.6.0/sun4-solaris/DynaLoader.pm line 200.
Thanks in advance.
Re: libsybdb.so: open failed
by shmem (Chancellor) on Mar 02, 2008 at 13:22 UTC
|
No such file or directory
That's right, I guess. But that could mean that
- either /opt/perl/5.6.0/lib/site_perl/5.6.0/sun4-solaris/auto/Sybase/DBlib/DBlib.so doesn't exist
- or a subsequent shared object file used by the above shared library doesn't exist
So, it seems to (and the fix is)
- either the module is not installed correctly (re-install)
- or the module was linked against the wrong libraries (re-install)
- or it has been compiled on a different machine and copied over (install software Sybase::DBlib depends
upon, then rebuild)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
| [reply] |
Re: libsybdb.so: open failed
by mpeppler (Vicar) on Mar 03, 2008 at 16:06 UTC
|
If libsybdb.so exists on your system (usually in $SYBASE/OCS-XY_Z/lib where XY_Z is 12_5 or 15_0) then the most likely problem is that your LD_LIBRARY_PATH isn't set correctly. The easiest way of setting your environment correctly is to source the SYBASE.sh (or SYBASE.csh) file located in the root directory of the Sybase install.
Michael
| [reply] |
Re: libsybdb.so: open failed
by akostocker (Initiate) on Mar 18, 2008 at 15:49 UTC
|
If you're dealing with a CGI script I've found that setting the LD_LIBRARY_PATH inside the perl cgi script does not work. Instead I've had to add a line to the Apache conf file in order to export the environment file correctly, like so:
PassEnv LD_LIBRARY_PATH | [reply] [d/l] |
|