Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys, As mentioned, I tried to install DB_File.pm on the above system, running Perl 5.6, using

perl -e shell -MCPAN

and got the following error:

Checking if your kit is complete... Looks good Writing Makefile for DB_File cp DB_File.pm blib/lib/DB_File.pm AutoSplitting blib/lib/DB_File.pm (blib/lib/auto/DB_File) cc -c -I/usr/local/BerkeleyDB/include -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.810\" -DXS_VERSION=\"1.810\" -fpic -I/usr/local/lib/perl5/5.6.1/i686-linux/CORE -D_NOT_CORE -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c version.c:30:16: db.h: No such file or directory make: *** version.o Error 1 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible

Evidently db.h is missing....

What's the best/cleanest solution?

Thx

Chris

  • Comment on Installing DB_File on Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.2-2 on an i686

Replies are listed 'Best First'.
Re: Installing DB_File on Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.2-2 on an i686
by hsinclai (Deacon) on Oct 12, 2004 at 04:02 UTC
    Try looking at your system's Berkely DB installation... you may have either a broken one or multiple installed berkeley versions confusing things. db.h usually is in /usr/include (or a subdirectory corresponding to what Linux thinks its base version should be, like /usr/include/db4), not to mention that the line -I/usr/local/BerkeleyDB/include is pointing it to a Berkeley db install in /usr/local/ (doesn't sound standard redhat to me)

    Try installing an rpm of DB_File instead of CPAN source.. might save lots of time..
Re: Installing DB_File on Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.2-2 on an i686
by iburrell (Chaplain) on Oct 12, 2004 at 22:28 UTC
    The most likely cause it that you don't have the development package for BerkeleyDB installed. It it may be db-devel, but may be something like db4-devel.
Re: Installing DB_File on Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.2-2 on an i686
by perrin (Chancellor) on Oct 12, 2004 at 20:18 UTC
    There is some pretty extensive help for Linux installation problems like this in the README that comes in the DB_File distribution. Take a look and see if that fixes it for you.