How to compile Perl module DBD::Sybase on RHEL7/CentOS7


RHEL7, sysadmin / lundi, septembre 15th, 2014

Perl module DBD::Sybase is needed to connect a SQL server from perl scripts.

As this module do not exist under RHEL7/CentOS 7, it’s needed to compile

Step-by-step guide

 

 

Install RPM’s

yum install freedts freetds-devel gcc make perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker 

  • Proceed to preparation

 

Preparation

mkdir -p /tmp/freetds/include
ln -s /usr/include /tmp/freetds/include/freetds
ln -s /usr/lib64/ /tmp/freetds/lib64
ln -s /usr/lib/ /tmp/freetds/lib 

  • Proceed to compilation/installation

 

Compilation / installation

cp DBD-Sybase-1.15.tar.gz /tmp/
cd /tmp
tar zxvfp DBD-Sybase-1.15.tar.gz
cd /tmp/DBD-Sybase-1.15
SYBASE=/tmp/freetds
echo ‘SYBASE=/tmp/freetds’ > CONFIG
perl Makefile.PL
make

make install