在 Windows 7(64 位)上使用 CPAN BerkeleyDB 模块 [英] Use CPAN BerkeleyDB module on Windows 7 (64 bit)

查看:38
本文介绍了在 Windows 7(64 位)上使用 CPAN BerkeleyDB 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在我的 Windows 7 (x86_64) PC 上安装 BerkeleyDB CPAN 模块,但没有任何运气(BerkeleyDB::Hash 是我所需要的).我安装了 64 位 ActivePerl 和 Oracle Berkeley DB 11gR2 5.3.15.首先,我尝试使用以下命令进行安装:

I have been trying to install the BerkeleyDB CPAN module on my Windows 7 (x86_64) PC without any luck (BerkeleyDB::Hash is what I need). I have 64 bit ActivePerl and Oracle Berkeley DB 11gR2 5.3.15 installed. First I tried installing using the command :

*cpan install BerkeleyDB*

返回错误:

*It looks like the installation of dmake and MinGW has failed.  You will not be
able to run Makefile commands or compile C extension code.  Please check your
internet connection and your proxy settings!*

所以我为 Windows 7 和 .NET Framework 4 安装了 Microsoft Windows SDK.

So I installed Microsoft Windows SDK for Windows 7 and .NET Framework 4.

然后我安装了 cpanm

Then I installed cpanm

*cpan App::cpanminus*

当我尝试跑步时:

*cpanm BerkeleyDB*

我收到错误:

*Note (probably harmless): No library found for -llibdb
Note (probably harmless): No library found for bufferoverflowU.lib*

所以我编辑了 config.in 文件并将 lib 和包含路径更改为:

So I edited the config.in file and changed the lib and include paths to:

*INCLUDE    =  C:\PROGRA~2\Oracle\BERKEL~1.15\include
LIB =  C:\PROGRA~2\Oracle\BERKEL~1.15\lib*

现在当我运行 perl makefile.pl 时,关于 -llibdb 的警告消失了.

Now when I ran perl makefile.pl, the warning about -llibdb went away.

当我尝试跑步时:

 *nmake* 

我遇到了错误:

  *Creating library blib\arch\auto\BerkeleyDB\BerkeleyDB.lib and object blib\arc
h\auto\BerkeleyDB\BerkeleyDB.exp
BerkeleyDB.obj : error LNK2001: unresolved external symbol __heap_exist
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_version
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_strerror
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_env_create
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_create
BerkeleyDB.obj : error LNK2001: unresolved external symbol db_sequence_create
blib\arch\auto\BerkeleyDB\BerkeleyDB.dll : fatal error LNK1120: 6 unresolved ext
ernals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\Bin\amd64\link.EXE"' : return code '0x460'
Stop.*

我几乎失去了在我的 PC 上成功构建这个模块的所有希望.有人幸运吗?

I've nearly lost all hope of ever building this module successfully on my PC. Has anyone been lucky with this?

非常感谢,

SN

推荐答案

以下所有声明均未经测试/未经验证.MagNET irc://irc.perl.org/win32> (网络聊天).

All following claims untested/unverified. Competent advice is available from #win32 on MagNET <irc://irc.perl.org/win32> (Web chat).

libdb 需要64 位补丁.在安装依赖库及其头文件之前安装一个全新的编译器工具链使问题变得更糟.如果您在应用补丁后仍然无法链接,请卸载 MS 工具并使用 MinGW 重试.

libdb needs patching for 64-bit. Installing a whole new compiler toolchain before installing the dependent library and its headers made the problem worse. If you continue to have problems linking after applying the patch, uninstall the MS tools and try again with MinGW.

这篇关于在 Windows 7(64 位)上使用 CPAN BerkeleyDB 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆