You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Robin Berjon <ro...@knowscape.com> on 2001/10/02 20:50:35 UTC

[OT] Re: DB_File needs compatible versions

On Tuesday 02 October 2001 20:19, mod_perl@humak.edu wrote:
> When I go to start apache with my startup.pl file it fails and says
>
> DB_File needs compatible versions of libdb & db.h
>         you have db.h version 3.1.17 and libdb version 2.4.14

Go to http://www.sleepycat.com, grab the latest BerkeleyDB, install it, 
re-install the Perl module DB_File, and try again. It's likely that RH messed 
these up somewhere. Otherwise, check that your includes and library paths are 
in sync (some versions of BerkeleyDB use different paths).

-- 
_______________________________________________________________________
Robin Berjon <ro...@knowscape.com> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
-----------------------------------------------------------------------
Radioactive cats have 18 half-lives.


Re: [OT] Re: DB_File needs compatible versions

Posted by Adi Fairbank <ad...@certsite.com>.
I had this problem also with redhat 7.1, and I fixed it the same way.

I believe it is caused by loading two different versions of the same shared
object into the Apache webserver.  In my case, I was loading one version
(db2) of berkeley db with:

  LoadModule db_auth_module  modules/mod_auth_db.so

and then a different version with DB_File.so inside mod_perl.  If you leave
the /usr/include/db.h pointing to db3/db.h when you compile DB_File, it
results in a version 3 DB_File.so object.

Another solution would probably be to comment out the LoadModule statement
in your .conf.  But that would only work if you don't need it for anything.

-Adi

victor@outblaze.com wrote:
> 
> I have seen this one before, you will have to recompile DB_File.pm.  Maybe
> someone can shade some light of why this happen, anyways here's how I fix it.
> 
> 1) I changed the symlink of db.h under /usr/include (btw, I'm using redhat 7.1)
> and point it to db2/db.h
> i.e.   lrwxrwxrwx    1 root     root            8 Jul 12 11:05 db.h -> db2/db.h
> 
> 2) untar the source of db_file.pm and modify the config.in file
>   - change the value of INCLUDE to /usr/include
>   - change the value of LIB to /usr/lib
>   - change the value of DBNAME to -db2
> 
> 3) save and compile, install the source.
> 
> -I have choose to use BerkelyDB 2 instead of 3, since I still have some berkely
> db file generated with BerkelyDB2.
> 
> -I am not completely sure if this will cause any harm to the system (especially
> the symlink part), but so far, everything works just fine for me.
> 
> Good luck.
> 
> Tor.
> 
> Robin Berjon wrote:
> 
> > On Tuesday 02 October 2001 20:19, mod_perl@humak.edu wrote:
> > > When I go to start apache with my startup.pl file it fails and says
> > >
> > > DB_File needs compatible versions of libdb & db.h
> > >         you have db.h version 3.1.17 and libdb version 2.4.14
> >
> > Go to http://www.sleepycat.com, grab the latest BerkeleyDB, install it,
> > re-install the Perl module DB_File, and try again. It's likely that RH messed
> > these up somewhere. Otherwise, check that your includes and library paths are
> > in sync (some versions of BerkeleyDB use different paths).
> >
> > --
> > _______________________________________________________________________
> > Robin Berjon <ro...@knowscape.com> -- CTO
> > k n o w s c a p e : // venture knowledge agency www.knowscape.com
> > -----------------------------------------------------------------------
> > Radioactive cats have 18 half-lives.


Re: [OT] Re: DB_File needs compatible versions

Posted by Scott Alexander <mo...@humak.edu>.
On Wed, 3 Oct 2001 victor@outblaze.com wrote:

>
> 1) I changed the symlink of db.h under /usr/include (btw, I'm using redhat 7.1)
> and point it to db2/db.h
> i.e.   lrwxrwxrwx    1 root     root            8 Jul 12 11:05 db.h -> db2/db.h
>
> 2) untar the source of db_file.pm and modify the config.in file
>   a - change the value of INCLUDE to /usr/include
>   b - change the value of LIB to /usr/lib
>   c - change the value of DBNAME to -db2
>
> 3) save and compile, install the source.

Just in case someone else has the same problem ...

I did all the above but not

'2 c - change the value of DBNAME to -db2'

And in /usr/lib/ I created a sym link libdb.a pointing to libdb2.a (the
version I wanted to use and then it worked.


thanks everyone for your help

now back to modperling after a hard disk broke.

Scott


Re: [OT] Re: DB_File needs compatible versions

Posted by vi...@outblaze.com.
I have seen this one before, you will have to recompile DB_File.pm.  Maybe
someone can shade some light of why this happen, anyways here's how I fix it.

1) I changed the symlink of db.h under /usr/include (btw, I'm using redhat 7.1)
and point it to db2/db.h
i.e.   lrwxrwxrwx    1 root     root            8 Jul 12 11:05 db.h -> db2/db.h

2) untar the source of db_file.pm and modify the config.in file
  - change the value of INCLUDE to /usr/include
  - change the value of LIB to /usr/lib
  - change the value of DBNAME to -db2

3) save and compile, install the source.

-I have choose to use BerkelyDB 2 instead of 3, since I still have some berkely
db file generated with BerkelyDB2.

-I am not completely sure if this will cause any harm to the system (especially
the symlink part), but so far, everything works just fine for me.

Good luck.

Tor.


Robin Berjon wrote:

> On Tuesday 02 October 2001 20:19, mod_perl@humak.edu wrote:
> > When I go to start apache with my startup.pl file it fails and says
> >
> > DB_File needs compatible versions of libdb & db.h
> >         you have db.h version 3.1.17 and libdb version 2.4.14
>
> Go to http://www.sleepycat.com, grab the latest BerkeleyDB, install it,
> re-install the Perl module DB_File, and try again. It's likely that RH messed
> these up somewhere. Otherwise, check that your includes and library paths are
> in sync (some versions of BerkeleyDB use different paths).
>
> --
> _______________________________________________________________________
> Robin Berjon <ro...@knowscape.com> -- CTO
> k n o w s c a p e : // venture knowledge agency www.knowscape.com
> -----------------------------------------------------------------------
> Radioactive cats have 18 half-lives.