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

This came back with the error:

It looks like the installation of dmake and MinGW has failed. You wil +l not be able to run Makefile commands or compile C extension code. Please che +ck your internet connection and your proxy settings!
So I installed Microsoft Windows SDK for Windows 7 and .NET Framework 4. Then I installed cpanm cpan App::cpanminus And when I tried running:
cpanm BerkeleyDB<code> I got the error: <code>Note (probably harmless): No library found for -llibdb Note (probably harmless): No library found for bufferoverflowU.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
Now when I ran perl makefile.pl, the warning about -llibdb went away. When I tried running: nmake I got errors:
Creating library blib\arch\auto\BerkeleyDB\BerkeleyDB.lib and object b +lib\arc h\auto\BerkeleyDB\BerkeleyDB.exp BerkeleyDB.obj : error LNK2001: unresolved external symbol __heap_exis +t 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_crea +te 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 unre +solved ext ernals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 10.0 \VC\Bin\amd64\link.EXE"' : return code '0x460' Stop.
I've nearly lost all hope of ever building this module successfully on my PC. Has anyone been lucky with this? Many thanks, SN

In reply to Install CPAN BerkeleyDB module on Windows 7 (64 bit) by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.