我一直試圖在我的Windows 7(x86_64)PC上安裝BerkeleyDB CPAN模塊,但沒有任何運氣(BerkeleyDB :: Hash就是我所需要的)。我安裝了64位ActivePerl和Oracle Berkeley DB 11gR2 5.3.15。首先,我嘗試使用以下命令進行安裝:在Windows 7(64位)上使用CPAN BerkeleyDB模塊
*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 SDK的Windows 7和.NET Framework 4
然後我安裝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和include路徑:
*INCLUDE = C:\PROGRA~2\Oracle\BERKEL~1.15\include
LIB = C:\PROGRA~2\Oracle\BERKEL~1.15\lib*
現在,當我跑的Perl makefile.pl ,關於-llibdb的警告消失了。
當我試圖運行:
*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.*
我幾乎失去了曾經成功地建設這個模塊我的電腦上的所有希望。有沒有人對此感到幸運?
非常感謝,
SN
「修補64位」的鏈接已損壞!你能解決它嗎,因爲我正在尋找解決這個問題的方法。 – smartmeta 2014-11-03 19:54:31
http://web.archive.org/web/20090706110722/http://win32.perl.org/wiki/index.php?title=Install_DB_File_on_Strawberry_Perl – daxim 2014-11-04 10:19:07
謝謝daxim。 – smartmeta 2014-11-04 11:10:05