WebFaction
Community site: login faq

I'm using a CentOS 6 server, and I need to install the DB_File Perl module as a prerequisite for some other software. But I keep getting errors. Has anyone had any success with this?

Thanks

asked 21 May '12, 11:46

PeterA
10431022
accept rate: 14%

edited 22 May '12, 00:06

ryans ♦♦
5.0k93460


OK, thanks to help from Ryan S. and also to a little bit of trial and error, I was able to make this happen. For anyone else who needs this module, here are the steps:

You need to build and install Oracle's Berkeley DB manually, but not just any version will work. The version that finally worked for me was 4.8.30. Then you need to build DB_File manually as well, with parameters to point it to the BerkeleyDB installation. Here are the exact steps you need to follow:

Open a shell session, and at the prompt:

mkdir -p $HOME/src (if you don't already have that directory)
cd $HOME/src
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar -xzf db-4.8.30.tar.gz
cd db-4.8.30
cd build_unix
../dist/configure --prefix="$HOME/BerkeleyDB4.8" \
--enable-compat185 \
--enable-dbm \
--enable-static \
--enable-cxx
make
make install

export LDFLAGS="-L$HOME/BerkeleyDB4.8/lib"
export CPPFLAGS="-I$HOME/BerkeleyDB4.8/include"
export C_INCLUDE_PATH="$HOME/BerkeleyDB4.8/include:$C_INCLUDE_PATH"
export LIBRARY_PATH="$HOME/BerkeleyDB4.8/lib:$LIBRARY_PATH"
export PERL5LIB="$HOME/lib/perl5"

cd $HOME/src
wget 'http://fossies.org/unix/privat/DB_File-1.826.tar.gz'
tar -xzf DB_File-1.826.tar.gz
cd DB_File-1.826
perl Makefile.PL INSTALL_BASE=$HOME
make
make install

DONE!!

permanent link

answered 21 May '12, 23:55

PeterA
10431022
accept rate: 14%

edited 22 May '12, 00:06

ryans ♦♦
5.0k93460

Looks good - thanks for sharing!

(22 May '12, 00:02) ryans ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×20
×11
×6
×6
×2

question asked: 21 May '12, 11:46

question was seen: 2,926 times

last updated: 22 May '12, 00:06

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM