in reply to Re: DBD::Sybase on Linux -- trouble?
in thread DBD::Sybase on Linux -- trouble?

Alas, this is what I indeed am trying. But the instructions below are dated -- for example, step 5. is not needed in the newer release of the .pm and step 6. seems to me to be incorrect. The instructions I am referring to can be found at and are repeated here for clarity.

You can't use CPAN to install the DBD::Sybase Perl drivers on Linux. T +here are a couple things that need to be tweaked by hand. 1. Download FreeTDS from This a free alternat +ive to Sybase's ct-lib library packages (which I couldn't find anywhe +re on their web or ftp sites, and which I wasn't willing to install t +he whole DB just to get). 2. Build FreeTDS: './configure --prefix=/usr/local/freetds; make; make + install'. 3. Open /usr/local/freetds/etc/freetds.conf and add a section for the +server you're using. An example: # This is an example Sybase server [SYBASE_EXAMPLE] host = ;host = port = 2025 tds version = 5.0 You'll use the string 'SYBASE_EXAMPLE' in your perl scripts as the +server to connect to, like so: my $dbh = DBI->connect("DBI:Sybase:server=SYBASE_EXAMPLE",'user' +,'pass'); 4. Download the DBD::Sybase tarball from +uthors/id/M/ME/MEWP/DBD-Sybase-0.95.tar.gz. (The online docs are at h +ttp:// 5. Edit DBD::Sybase's dbdimp.c (it's in the top of the untarred direct +ory), and change every cs_ctx_global() you find to cs_ctx_alloc(). Th +ere are probably four occurences to change, so do a global search and + replace. 6. Edit DBD::Sybase's CONFIG file (it's also right on top there). Add +the following lines: SYBASE=/usr/local/freetds EXTRA_LIBS=-linsck 7. Do the standard 'perl Makefile.PL; make; make install'. 8. Run a test script to make sure it all works.

When doing step 7., I get the following error which (seems) to point to the fact that the Sybase libs cannot be found under freetds (or any subdirectory under which freetds is installed). There is not even a /lib or /lib64 directory under freetds. Please meditate with me and help in resolving this issue, oh enlightened ones.

Error when compiling (i.e. running perl Makefile.PL): Can't find any Sybase libraries in /usr/local/freetds/freetds-0.91/lib + or /usr/local/freetds/freetds-0.91/lib64 at Makefile.PL line 146, <I +N> line 45.

Replies are listed 'Best First'.
Re^3: DBD::Sybase on Linux -- trouble?
by blue_cowdawg (Monsignor) on Aug 02, 2012 at 13:50 UTC

    Did you look here? That set of directions seems to jive with what I remember from about 10 years ago when I did this last.

    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg