Berkeley DB libraries
October 23, 2004 11:16 AM   Subscribe

Yet another dorky Linux question: how can I install an upgraded version of the Berkeley DB libraries on my RedHat Linux 9 machine without totally horking all the apps that are installed that rely on the older version? (more inside)

I currently have the latest version of 4.0 installed, which is the highest version supported by the RedHat RPM system. Too many apps to conceive of have been compiled against that version; while I wouldn't begin to know how to find them all, I do know that a bunch (including my IMAP server, my webserver, and a few other system-critical services) use v4.0 for their support files. I now have two apps that need v4.2 in order to compile.

I compiled v4.2 using the latest source from the SleepyCat site, and installed it in the default location (/usr/local/BerkeleyDB.4.2/); that's relatively nonstandard for RedHat, so when I started compiling one of the apps that needs v4.2, I gave ./configure the relevant command-line options (LDFLAGS, CPPFLAGS). Configure completed without issue, but the compile step wouldn't complete because it couldn't track down all the header files. So then I realized that it probably makes sense to try to install v4.2 in the "standard" RedHat locations (/usr/lib, /usr/include, etc.) I have TERRIBLE memories of this failing miserably in the past -- totally screwing up old apps, bringing my system to its knees, that sort of thing -- so now I reach out to my AskMe buddies for help! Is there a way to do this which (a) allows newly-compiling apps to find the libraries easily, and (b) allows old apps to still use the v4.0 libraries without complaining?
posted by delfuego to Computers & Internet (2 answers total)
 
BerkeleyDB upgrades are indeed a bitch. Can the new apps run chrooted?
posted by nicwolff at 3:02 PM on October 23, 2004


The new app just needs to be able to find the libraries at run time. And it's perfectly "legal" to have several versions of library in play at once. The trick is going to be getting it compiled. You may be able to do this on another computer. If worse comes to worse you can try to compile a static version of the app. You can probably edit the makefile to make sure you have a -I entry that matches where you installed the header files.

(YMMV -- I've done this lots of times with other kinds of libraries, never with berkely db)
posted by RustyBrooks at 7:16 AM on October 24, 2004


« Older Good Debussy?   |   List of best-selling novels of all time? Newer »
This thread is closed to new comments.