Compilation on Debian Wheezy fails - need to use libdb 4.8 #3686

issue kostaz opened this issue on February 16, 2014
  1. kostaz commented at 6:58 PM on February 16, 2014: contributor

    Running "./configure" reports the below error: configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore)

    Naturally, libdb-4.8 is needed for wallet portability, hence, need to resolve this issue. Please help (add instructions) on how to install Berkeley DB 4.8 manually.

    The default Berkeley DB on Debian Wheezy is 5.1.

  2. gavinandresen commented at 8:02 PM on February 16, 2014: contributor

    No, please visit the Berkeley DB website for instructions on installing BDB.

  3. gavinandresen closed this on Feb 16, 2014

  4. kostaz commented at 8:29 PM on February 16, 2014: contributor

    I used the below instruction from http://www.peercointalk.org/index.php?topic=798.0 link:


    Get db4.8 source, compile and install

    wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz tar -xzvf db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix ../dist/configure --enable-cxx make sudo make install

    Tell your system where to find db4.8

    export BDB_INCLUDE_PATH="/usr/local/BerkeleyDB.4.8/include" export BDB_LIB_PATH="/usr/local/BerkeleyDB.4.8/lib" ln -s /usr/local/BerkeleyDB.4.8/lib/libdb-4.8.so /usr/lib/libdb-4.8.so

    ln -s /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so /usr/lib/libdb_cxx-4.8.so

    Unfortunately, the result is the same.

  5. laanwj commented at 8:21 AM on February 17, 2014: member

    There should be an option to tell ./configure where it can find the BDB headers / libraries but it doesn't seem to exist.

    This is where it searches for the BDB 4.8 lib: https://github.com/bitcoin/bitcoin/blob/master/src/m4/bitcoin_find_bdb48.m4

  6. laanwj commented at 8:27 AM on February 17, 2014: member

    Can you try:

    ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib"
    

    It's ugly but the only way at this moment, I think.

  7. jeromecc commented at 1:27 AM on May 30, 2014: none
    ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib"
    

    Might be ugly but it worked on Debian Wheezy. I followed link and instructions from kostaz (on february 16 's comment on this page) to successfully compile BerkeleyDB 4.8.

  8. laanwj commented at 6:38 AM on May 30, 2014: member

    @jeromecc There have been instructions in the UNIX build documentation for a while for building BDB 4.8: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db I suggest following those as they don't install BerkeleyDB system-wide.

  9. anthonyettinger commented at 8:14 AM on February 18, 2015: none

    How hard is it to support latest version of db?

  10. luke-jr commented at 9:39 AM on February 18, 2015: member

    The issue is that newer versions of bdb produce wallet files which are not backward compatible, thus will not load in official binaries using 4.8. If you don't care about this, you can configure using --with-incompatible-bdb to force it to use a newer version. Another alternative is --disable-wallet to avoid the bdb dependency altogether.

  11. jcoffland commented at 4:23 AM on January 27, 2017: none

    With checkinstall you can do this:

    wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
    tar -xzvf db-4.8.30.NC.tar.gz
    cd db-4.8.30.NC/build_unix
    ../dist/configure --enable-cxx --prefix=/usr
    make -j8
    sudo checkinstall --fstrans=no --pkgversion=4.8.30 --pkgname=libdb-dev --nodoc -y
    

    This puts bdb in the system as a Debian package where bitcoin can find it. Note, this only works if you don't already have another version of libbd-dev installed.

    You can remove it later with:

    sudo dpkg -r libdb-dev
    
  12. tsusanka commented at 7:11 PM on July 4, 2018: none

    sudo checkinstall --fstrans=no --pkgversion=4.8.30 --pgkname=libdb-dev --nodoc -y

    Just a note, there is a typo in @jcoffland's last command. It should be

    sudo checkinstall --fstrans=no --pkgversion=4.8.30 --pkgname=libdb-dev --nodoc -y

  13. fanquake commented at 11:55 PM on July 4, 2018: member

    Thanks @tsusanka, I've edited the comment above as well.

  14. potadibyo commented at 8:10 AM on August 9, 2018: none

    Thanks dear @fanquake and dear @jcoffland but checkinstall is not a command is writting

  15. psygoa commented at 1:07 AM on March 11, 2019: none

    its ok! ./autogen.sh && ./configure --with-incompatible-bdb && make

  16. cryptozeny commented at 1:49 AM on April 13, 2019: none

    same here on ubuntu 16.04. is this safe with this command?

    ./configure --with-incompatible-bdb

  17. MarcoFalke locked this on Apr 13, 2019

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me