在带有Homebrew的OS X上安装DBD :: Sybase无法找到freetds库

问题描述:

我正在安装DBD :: Sybase

I am installing DBD::Sybase

设置后,我收到以下错误

I receive following error, after setting

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

并下载freetds:

and download freetds:

brew install freetds

错误:

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

我认为我需要直接编辑Makefile.我需要编辑makefile吗?而且我还能使用CPANM吗? CPANM在Brew(地窖)下.

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

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

配置的一部分认为您在Windows上. Perl将OS X报告为darwin,而DBD :: Sybase正在像MSWin32cygwin中那样检查/win/.结果,它寻找一个dll目录,但错误地报告它寻找的是liblib64.

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.

快速解决方案是使用cpanm --prompt DBD::Sybase.如果失败,cpanm会问该怎么办.

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]

将其告知l)ook.这会将您转储到带有DBD :: Sybase解压缩源的shell中.使用编辑器删除Makefile.PL中的第143-145行.

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' );
}

然后exit外壳. cpanm会问您要再做什么,并将其告知r)etry.它应该使用您编辑过的Makefile.PL.

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