Skip to Content.
Sympa Menu

freetds - Re: DBD::Sybase: Shared object "libct.so.0" not found

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: DBD::Sybase: Shared object "libct.so.0" not found
  • Date: Wed, 5 Dec 2001 08:18:11 -0800


Scott Gregory writes:
> Thanks for the help. I added the LD_LIBRARY_PATH and SYBASE to my cron
> environment and its working now (I knew it was an easy fix, I just wasn't
> awake enough to see it). Looking back through the docs
> (DBD::Sybase) is says I can set SYBASE in a BEGIN block. From your reply
> I am assuming that LD_LIBRARY_PATH cannot be set the same way, it MUST be
> set before perl cranks up. I guess perl doesn't use the modified
> environment when it looks for additional libraries. Bummer.

It's not perl, it's dynamic loader (ld.so in most cases).

> In the docs for FreeTDS it states to
> place the LD_LIBRARY_PATH and SYBASE env variables in the script in a
> BEGIN block.......Is this correct?

The SYBASE env. variable needs to be set before DBD::Sybase gets
loaded - it doesn't necessarily be in a BEGIN block. If you use
Sybase::CTlib then the env. variable must be set in a BEGIN
block. It's all a question of knowing (understanding) the order in
which various operations are executed (compile time vs. run time).

Setting SYBASE in a BEGIN block never hurts, however.

Michael

> On Tue, 4 Dec 2001, Michael Peppler wrote:
>
> > listaccount AT earthlink.net writes:
> > > To All,
> > >
> > > I know I'm missing something very easy, so here is my problem:
> > >
> > > My perl script runs fine when I run it from the command line, however
> > when
> > > I run it from a cron job I get the following error:
> > >
> > > "install_driver(Sybase) failed: Can't load
> > >
> > '/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBD/Sybase/Sybase.so'
> > > for module DBD::Sybase: Shared object
> > > "libct.so.0" not found at /usr/libdata/perl/5.00503/DynaLoader.pm line
> > > 169, <CONFIG_FILE> chunk 55."
> > >
> > > LD_LIBRARY_PATH, SYBASE, and DSQUERY are all set before loading the
> > DBI
> > > and attempting to connect to the DB.
> >
> > If you set LD_LIBRARY_PATH in the script itself then that's a problem
> > - it will not work.
> >
> > You have to set LD_LIBRARY_PATH in the parent process.
> >
> > Michael
> > --
> > Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
> > mpeppler AT peppler.org - mpeppler AT mbay.net
> > International Sybase User Group - http://www.isug.com
> >
> > ---
> > You are currently subscribed to freetds as: [listaccount AT earthlink.net]
> > To unsubscribe, forward this message to $subst('Email.Unsub')
> >
>
>
> ---
> You are currently subscribed to freetds as: [mpeppler AT peppler.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')

--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler AT peppler.org - mpeppler AT mbay.net
International Sybase User Group - http://www.isug.com




Archive powered by MHonArc 2.6.24.

Top of Page