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 http://www.freetds.org/. 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
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
host = sybase.example.com
;host = 192.168.1.125
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'
4. Download the DBD::Sybase tarball from http://search.cpan.org/CPAN/a
+uthors/id/M/ME/MEWP/DBD-Sybase-0.95.tar.gz. (The online docs are at h
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
6. Edit DBD::Sybase's CONFIG file (it's also right on top there). Add
+the following lines:
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.