in reply to Installing BerkeleyDB in WSL/ubuntu

Did you read Missing db.h or libdb.a?

  • Comment on Re: Installing BerkeleyDB in WSL/ubuntu

Replies are listed 'Best First'.
Re^2: Installing BerkeleyDB in WSL/ubuntu
by perlboy_emeritus (Scribe) on Feb 01, 2021 at 17:53 UTC

    Thank you marto (+++),

    That link, though outdated, really helped. I found a 4-year old tutorial for installing libdb4.8-dev and libdb4.8++-dev, so I searched apt-cache and found libdb5.3-dev and libdb5.3++-dev. After installing both of these building Perl's BerkeleyDB and MLDBM with cpanm both worked perfectly; no errors. My biased observation; my bad. I should have read the README :-( When all else fails, read the documentation. Without Monks to fall back on, I would be up the proverbial creek without a paddle. I have Geodesic great circle calculators written in C and Perl that use Berkeley DB I am very proud of and don't wish to lose. One uses spherical calculus, as in:

    greatCircleBDB.pl* mapHashBDB 'Renton, WA' 'Redmond, OR'

    Calculate great-circle distance between: Renton, WA: 0.828799, -2.132710 and, Redmond, OR: 0.772381, -2.114462. Geodesics in radians. GCD (Spherical Law of Cosines) between Renton, WA and Redmond, OR: 368 +.430 km, (198.936 NM). GCD (Haversine) between Renton, WA and Redmond, OR: 368.430 km, (198.936 NM). GCD (Vincenty inverse formula) between Renton, WA and Redmond, OR: 368 +.336 km, (198.885 NM).

    I can now continue exploring using Perl to solve advanced math problems, my hobby now that I'm retired (math minor from UofI, 1971. Crypto next up...

    Thanks again.

      Glad that worked for you, or at least gave a pointer in the right direction. That link is for the current README file, though that part has probably been the same for ages. Had it not been so late (my time) when posting I'd have suggested doing sudo apt install libberkeleydb-perl from the Ubuntu command prompt (within WSL) to install the perl module for the system perl from the Ubuntu repos.

Re^2: Installing BerkeleyDB in WSL/ubuntu
by Anonymous Monk on Feb 01, 2021 at 07:49 UTC
    Further up in prerequisites
    * Berkeley DB Version 2.6.4 or greater The official web site for Berkeley DB is http://www.oracle.com/technology/products/berkeley-db/db/index +.html The latest version of Berkeley DB is always available there. It is recommended that you use the most recent version available.