sql server - Using Ubuntu, how do I install DBD::Sybase from CPAN? -


whenever try build dbd::sybase connect mssql 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 sybase libraries in /etc/lib or /etc/lib64 @ /home/ecarroll/.cpanplus/5.14.2/build/dbd-sybase-1.15/makefile.pl line 155, <in> line 44. begin failed--compilation aborted @ /usr/bin/cpanp-run-perl line 11, <in> line 44. [error] not run '/usr/bin/perl makefile.pl': can't find sybase libraries in /etc/lib or /etc/lib64 @ /home/ecarroll/.cpanplus/5.14.2/build/dbd-sybase-1.15/makefile.pl line 155, <in> line 44. begin failed--compilation aborted @ /usr/bin/cpanp-run-perl line 11, <in> line 44.  -- cannot continue  [error] unable create new distribution object '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 1 or more modules 

i've gotten error on other debian systems.

there 2 ways that,

  • (a) freetds distro provides
  • or, (b) installing vanilla freetds upstream , building against that.

the second option (b) possible, system may have 2 different versions of freetds.

the first option can not done without hacking , author not fix it. hard headed , wants fix internal structures match os uses rather making accepting of other configurations.

internally dbd::sybase expects there directory, , $libdir (a subdirectory lib or lib64). directories dbd::sybase requires build not provided debian package freetds-dev; debian package installs /usr/include doesn't have lib or lib64 subdirectory. can around fooling make , recreating structure, first make sure have freetds-dev installed,

sudo apt-get install freetds-dev 

then link create pseudo-package. on 64 bit machine, looks this.

mkdir /tmp/freetds ln -s /usr/lib/x86_64-linux-gnu/ /tmp/freetds/lib64 ln -s /usr/include /tmp/freetds/include/freetds 

now, should work , can build dbd::sybase against system libraries.

sudo sybase=/tmp/freetds cpanp install dbd::sybase 

viola.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -