Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

DBD::Sybase - problem loading shared object

by McDarren (Abbot)
on Nov 07, 2006 at 00:38 UTC ( #582529=perlquestion: print w/replies, xml ) Need Help??
McDarren has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks,

I'm quite certain that I'm missing something obvious here, but I'm afraid that my brain is currently fried :/

Yesterday we had a hard disk failure on one of our key production servers (most of our critical stuff backed-up, thankfully), and for the past 24 hours or so we've been frantically re-building things.

This is a Linux box (Suse 9.3), and one of the things it needs to do is talk to a MS-SQL server. Previously I had this working using DBD::Sybase with the FreeTDS libraries.

So on the rebuilt box I installed and tested FreeTDS, and have it working fine (ie. I can establish a database connection from the command line). I then downloaded, built, and installed DBD::Sybase, which also installed error-free.

However, when I try to use it, this is what I get:

perl -MDBD::Sybase Can't load '/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi +/auto/DBD/Sybase/' for module DBD::Sybase: canno +t open shared object file: No such file or directory at /usr/lib64/pe +rl5/5.8.5/x86_64-linux-thread-multi/ line 230. at - line 0 Compilation failed in require. BEGIN failed--compilation aborted. exists...

file /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/D +BD/Sybase/ /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/Sy +base/ ELF 64-bit LSB shared object, AMD x86-64, version 1 ( +SYSV), not stripped
...but as I said - I'm quite sure I'm overlooking something obvious and fundamental.

Can somebody please tell me what it is?

Many thanks,

Replies are listed 'Best First'.
Re: DBD::Sybase - problem loading shared object
by devnul (Monk) on Nov 07, 2006 at 02:03 UTC
    Two more things to try:

    Add $ENV{'SYBASE'} = '/wherever/it/is'; inside a BEGIN block.

    Add /usr/local/freetds/lib (or wherever libct sits) to LD_LIBRARY_PATH

    - dEvNuL
Re: DBD::Sybase - problem loading shared object
by devnul (Monk) on Nov 07, 2006 at 01:56 UTC
    Does exist?

    - dEvNuL
Re: DBD::Sybase - problem loading shared object
by Argel (Prior) on Nov 07, 2006 at 02:01 UTC
    What happens if run ldd against Is there a permissions issue (can the user the script runs under read the library and any other dependancies)?
      That was the clue we needed - thanks.

      The fix was to add /usr/local/freetds/lib to /etc/, and then run ldconfig.

      All is working fine now.

      Thanks again,
      Darren :)

Re: DBD::Sybase - problem loading shared object
by Anonymous Monk on Oct 21, 2016 at 16:07 UTC
    Thanks from 2016!! Solved my problem!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://582529]
Approved by GrandFather
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-08-21 23:09 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (204 votes). Check out past polls.