Installing DBD::Sybase on OS X with Homebrew fails to find freetds libraries

拜拜、爱过 提交于 2019-12-24 08:28:59

问题


I am installing DBD::Sybase

I receive following error, after setting

export SYBASE=/usr/local/Cellar/freetds/0.95.80

and download freetds:

brew install freetds

Error:

Configuring DBD-Sybase-1.15 ... Can't find any Sybase libraries in /usr/local/Cellar/freetds/0.95.80/lib or /usr/local/Cellar/freetds/0.95.80/lib64 at Makefile.PL line 155, <IN> line 44

I believe I need to edit the makefile directly. Do I need to edit makefile? And could I use CPANM still. CPANM is under Brew (cellar).

/usr/local/Cellar/freetds/0.95.80/lib
├── libct.4.dylib
├── libct.a
├── libct.dylib -> libct.4.dylib
├── libsybdb.5.dylib
├── libsybdb.a
└── libsybdb.dylib -> libsybdb.5.dylib


 /usr/local/Cellar/freetds/0.95.80/
AUTHORS              ChangeLog            NEWS                 TODO                 etc                  lib
COPYING              INSTALL_RECEIPT.json README               bin                  include              share

回答1:


There is a reported bug in DBD::Sybase on OS X which is causing your problem.

One part of the configuration thinks you're on Windows. Perl reports OS X as darwin and DBD::Sybase is checking for /win/ as in MSWin32 or maybe cygwin. As a result it looks for a dll directory, but falsely reports it's looking for lib and lib64.

The quick fix is to use cpanm --prompt DBD::Sybase. When it fails, cpanm will ask what to do.

Configuring DBD-Sybase failed.
You can s)kip, r)etry, e)xamine build log, or l)ook ? [s]

Tell it to l)ook. This will dump you into a shell with the unpacked source for DBD::Sybase. Use an editor to delete lines 143-145 in the Makefile.PL.

if ($^O =~ /win/i) {
  @libdir = ( 'dll' );
}

Then exit the shell. cpanm will ask you what to do again, tell it to r)etry. It should use your edited Makefile.PL.



来源:https://stackoverflow.com/questions/40660109/installing-dbdsybase-on-os-x-with-homebrew-fails-to-find-freetds-libraries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!