2

I am trying to install the Perl package Vcf, which has a LOT of dependencies. One of these dependencies DB_File will not install.

con@VB:~$ cpanm DB_File
--> Working on DB_File
Fetching http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-1.852.tar.gz ... OK
Configuring DB_File-1.852 ... OK
Building and testing DB_File-1.852 ... FAIL
! Installing DB_File failed. See /home/con/.cpanm/work/1567015698.27372/build.log for details. Retry with --force to force install it.
con@VB:~$ cat /home/con/.cpanm/work/1567015698.27372/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.030000 built for x86_64-linux
Work directory is /home/con/.cpanm/work/1567015698.27372
You have make /usr/bin/make
You have LWP 6.39
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching DB_File () on cpanmetadb ...
--> Working on DB_File
Fetching http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-1.852.tar.gz
-> OK
Unpacking DB_File-1.852.tar.gz
Entering DB_File-1.852
Checking configure dependencies from META.json
Configuring DB_File-1.852
Running Makefile.PL
Parsing config.in...
Looks Good.
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -ldb
Generating a Unix-style Makefile
Writing Makefile for DB_File
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Building and testing DB_File-1.852
cp DB_File.pm blib/lib/DB_File.pm
Running Mkbootstrap for DB_File ()
chmod 644 "DB_File.bs"
"/home/con/perl5/perlbrew/perls/perl-5.30.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_File.bs blib/arch/auto/DB_File/DB_File.bs 644
cc -c  -I/usr/local/BerkeleyDB/include -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.852\" -DXS_VERSION=\"1.852\" -fPIC "-I/home/con/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0/x86_64-linux/CORE"  -D_NOT_CORE  -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t   version.c
version.c:30:10: fatal error: db.h: No such file or directory
 #include <db.h>
          ^~~~~~
compilation terminated.
Makefile:353: recipe for target 'version.o' failed
make: *** [version.o] Error 1
-> FAIL Installing DB_File failed. See /home/con/.cpanm/work/1567015698.27372/build.log for details. Retry with --force to force install it

1 Answer 1

8

You need the libdb development library installed on your machine before you can build DB_File — this probably comes from a package called libdb-dev or libdb-devel in your system package manager.

Sign up to request clarification or add additional context in comments.

1 Comment

Yep, for me I needed: libdb5.3-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.