Whenever I try to build DBD::Sybase
to connect to MSSQL I get an error,
$ sudo cpanp install DBD::Sybase
Installing DBD::Sybase (1.15)
Running [/usr/bin/perl /usr/bin/cpanp-run-perl /home/ecarroll/.cpanplus/5.14.2/build/DBD-Sybase-1.15/Makefile.PL INSTALLDIRS=site]...
Can't find any Sybase libraries in /etc/lib or /etc/lib64 at /home/ecarroll/.cpanplus/5.14.2/build/DBD-Sybase-1.15/Makefile.PL line 155, <IN> line 44.
BEGIN failed--compilation aborted at /usr/bin/cpanp-run-perl line 11, <IN> line 44.
[ERROR] Could not run '/usr/bin/perl Makefile.PL': Can't find any Sybase libraries in /etc/lib or /etc/lib64 at /home/ecarroll/.cpanplus/5.14.2/build/DBD-Sybase-1.15/Makefile.PL line 155, <IN> line 44.
BEGIN failed--compilation aborted at /usr/bin/cpanp-run-perl line 11, <IN> line 44.
-- cannot continue
[ERROR] Unable to create a new distribution object for 'DBD::Sybase' -- cannot continue
*** Install log written to:
/home/ecarroll/.cpanplus/install-logs/DBD-Sybase-1.15-1374605483.log
Error installing 'DBD::Sybase'
Problem installing one or more modules
I've also gotten this error on other Debian systems.
There are two ways to do that,
The second option (b) is always possible, but then your system may have two different versions of freetds.
The first option can not be done without some hacking and the author will not fix it. He is simply hard headed and wants to fix internal structures to match the OS he uses rather than making it accepting of other configurations.
Internally
DBD::Sybase
expects there to be a directory, and a$libdir
(a subdirectory withlib
orlib64
). The directoriesDBD::Sybase
requires to build properly are not provided by the Debian packagefreetds-dev
; the Debian package installs to/usr/include
which doesn't have alib
or alib64
subdirectory. You can get around this by foolingmake
and recreating that structure, first make sure you havefreetds-dev
installed,Then link it to create a pseudo-package. On my 64 bit machine, it looks something like this.
Now, it should work and you can build
DBD::Sybase
against system libraries.Viola.
To install modules for the system perl, you can install the packages from the Ubuntu repositories. While these may be out of date, library dependencies are resolved aoutomatically. In this case, a
should do the trick.
I believe you have to make the
include
subdirectory, otherwise the secondln
will fail: