configure: error: libdb_cxx headers missing (netbsd) #2998

Closed
paulogeyer opened this Issue Sep 15, 2013 · 34 comments

Comments

Projects
None yet
@paulogeyer

these files are located in /usr/pkg/include/db4

samsa% ls /usr/pkg/include/db4
db.h db_185.h db_cxx.h

@luke-jr

This comment has been minimized.

Show comment
Hide comment
@luke-jr

luke-jr Sep 15, 2013

Member

This path should already be searched if /usr/pkg/include is in your include path... Can you post a config.log?

Member

luke-jr commented Sep 15, 2013

This path should already be searched if /usr/pkg/include is in your include path... Can you post a config.log?

@ghedipunk

This comment has been minimized.

Show comment
Hide comment
@ghedipunk

ghedipunk Sep 25, 2013

Same issue here:

CentOS running on a virtual machine.

locate db_cxx.h
/usr/include/db_cxx.h
/usr/include/db4/db_cxx.h
/usr/share/doc/db4-devel-4.7.25/ref/upgrade.3.0/db_cxx.html
_

Contents of config.log: http://pastebin.com/N1jW9GuF

Same issue here:

CentOS running on a virtual machine.

locate db_cxx.h
/usr/include/db_cxx.h
/usr/include/db4/db_cxx.h
/usr/share/doc/db4-devel-4.7.25/ref/upgrade.3.0/db_cxx.html
_

Contents of config.log: http://pastebin.com/N1jW9GuF

@Diapolo

This comment has been minimized.

Show comment
Hide comment
@Diapolo

Diapolo Oct 4, 2013

Still an issue with latest master? AFAIK there were changes with the new autotools system so perhaps you can try again.

Diapolo commented Oct 4, 2013

Still an issue with latest master? AFAIK there were changes with the new autotools system so perhaps you can try again.

@gongchengra

This comment has been minimized.

Show comment
Hide comment
@gongchengra

gongchengra Oct 16, 2013

Same problem on ubuntu 13.04.

Same problem on ubuntu 13.04.

@gongchengra

This comment has been minimized.

Show comment
Hide comment
@gongchengra

gongchengra Oct 16, 2013

sudo apt-get install libdb++-dev solves my problem.

sudo apt-get install libdb++-dev solves my problem.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Oct 16, 2013

Member

Obviously you get that error if libdb is not installed... if you read carefully, the original poster has the library installed but it is not detected, so it is not the same problem.

Member

laanwj commented Oct 16, 2013

Obviously you get that error if libdb is not installed... if you read carefully, the original poster has the library installed but it is not detected, so it is not the same problem.

@alexander-ivanov

This comment has been minimized.

Show comment
Hide comment
@alexander-ivanov

alexander-ivanov Nov 29, 2013

Since there is no libdb++ in official CentOs repo, I've done the following to fix this problem

  1. Download sources of BerkeleyDb 4.8
  2. Go to /build_unix/
  3. ../dist/configure --prefix=/usr/local --enable-cxx
  4. make
  5. (as root) make install

Since there is no libdb++ in official CentOs repo, I've done the following to fix this problem

  1. Download sources of BerkeleyDb 4.8
  2. Go to /build_unix/
  3. ../dist/configure --prefix=/usr/local --enable-cxx
  4. make
  5. (as root) make install
@tjuryakin

This comment has been minimized.

Show comment
Hide comment
@tjuryakin

tjuryakin Dec 5, 2013

Alex, thank you!

Alex, thank you!

@donSchoe

This comment has been minimized.

Show comment
Hide comment
@donSchoe

donSchoe Dec 31, 2013

I have the same issue: I've compiled BDB from source but dont want to install it. Can I point the configure script to my db_cxx.h somehow?

Edit: I've added it to ./src/m4/bitcoin_find_bdb48.m4:

  bdbdirlist=/path/to/compiled/db-4.8.30.NC/build_unix/build/include

Works.

I have the same issue: I've compiled BDB from source but dont want to install it. Can I point the configure script to my db_cxx.h somehow?

Edit: I've added it to ./src/m4/bitcoin_find_bdb48.m4:

  bdbdirlist=/path/to/compiled/db-4.8.30.NC/build_unix/build/include

Works.

@lrascao

This comment has been minimized.

Show comment
Hide comment
@lrascao

lrascao Jan 17, 2014

a better option would be to add a --with-db4 option to configure

lrascao commented Jan 17, 2014

a better option would be to add a --with-db4 option to configure

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jan 18, 2014

Member

Yes, or BDB_CFLAGS/BDB_LIBS as proposed in #3550

Member

laanwj commented Jan 18, 2014

Yes, or BDB_CFLAGS/BDB_LIBS as proposed in #3550

@coincapsig

This comment has been minimized.

Show comment
Hide comment
@coincapsig

coincapsig Feb 2, 2014

This can be fixed by doing the following:
cd ~/db-4.8.30.NC/build_unix make sudo make install
Check that there is a BerkeleyDB.4.8 folder in /usr/local
ls /usr/local
then create a symbolic link:
ln -s /usr/local/BerkeleyDB.4.8 /usr/include/db4.8
and then do:
ln -s /usr/local/db4.8/include/* /usr/include ln -s /usr/local/db4.8/lib/* /usr/lib

This can be fixed by doing the following:
cd ~/db-4.8.30.NC/build_unix make sudo make install
Check that there is a BerkeleyDB.4.8 folder in /usr/local
ls /usr/local
then create a symbolic link:
ln -s /usr/local/BerkeleyDB.4.8 /usr/include/db4.8
and then do:
ln -s /usr/local/db4.8/include/* /usr/include ln -s /usr/local/db4.8/lib/* /usr/lib

@fastest963

This comment has been minimized.

Show comment
Hide comment
@fastest963

fastest963 Mar 26, 2014

Any benefit to the symlink vs something like:

echo "/usr/local/lib" > /etc/ld.so.conf.d/db-4.8.30.conf
ldconfig

Any benefit to the symlink vs something like:

echo "/usr/local/lib" > /etc/ld.so.conf.d/db-4.8.30.conf
ldconfig
@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Mar 26, 2014

Member

Or build a static library and not a shared one, so you don't have to install the library on your system search path at all.

Member

laanwj commented Mar 26, 2014

Or build a static library and not a shared one, so you don't have to install the library on your system search path at all.

@dlio

This comment has been minimized.

Show comment
Hide comment
@dlio

dlio Apr 28, 2014

[centos 6.5, current bitcoin version] I seem to have successfully compiled bitcoind, however, when I try to run it, I get the following:

./bitcoind: error while loading shared libraries: libdb_cxx-4.8.so: cannot open shared object file: No such file or directory

Having followed the directions here, I downloaded and compiled 4.8 source, but I can't seem to get any BerkeleyDB.4.8 folders to be generated in /usr/local.
I have, however, located libdb_cxx-4.8.so in db-4.8.30.NC/build_unix/.libs

If I simply copy or reference this .so file in the correct places, should that resolve the issue?
Using 'locate libdb_cxx' I get entries for 'libdb_cxx.so' and 'libdb_cxx-4.7.so' in /usr/lib64, but that's all.

Should I point bitcoin/src/m4/bitcoin_find_bdb48.m4, line:7, to
'bdbdirlist=/root/berkeley-db/db-4.8.30.NC/build_unix/.libs' ? (the db-4.8.30.NC/build_unix/build/include directory mentioned above does not exist for me).

Copying libdb_cxx-4.8.so do /usr/lib64 does not seem to resolve the issue.

My apologies in advance for my limited understanding. I'm still getting up to speed with several layers of abstraction involved here. Thanks in advance. Full post here: https://bitcointalk.org/index.php?topic=588032

dlio commented Apr 28, 2014

[centos 6.5, current bitcoin version] I seem to have successfully compiled bitcoind, however, when I try to run it, I get the following:

./bitcoind: error while loading shared libraries: libdb_cxx-4.8.so: cannot open shared object file: No such file or directory

Having followed the directions here, I downloaded and compiled 4.8 source, but I can't seem to get any BerkeleyDB.4.8 folders to be generated in /usr/local.
I have, however, located libdb_cxx-4.8.so in db-4.8.30.NC/build_unix/.libs

If I simply copy or reference this .so file in the correct places, should that resolve the issue?
Using 'locate libdb_cxx' I get entries for 'libdb_cxx.so' and 'libdb_cxx-4.7.so' in /usr/lib64, but that's all.

Should I point bitcoin/src/m4/bitcoin_find_bdb48.m4, line:7, to
'bdbdirlist=/root/berkeley-db/db-4.8.30.NC/build_unix/.libs' ? (the db-4.8.30.NC/build_unix/build/include directory mentioned above does not exist for me).

Copying libdb_cxx-4.8.so do /usr/lib64 does not seem to resolve the issue.

My apologies in advance for my limited understanding. I'm still getting up to speed with several layers of abstraction involved here. Thanks in advance. Full post here: https://bitcointalk.org/index.php?topic=588032

@coincapsig

This comment has been minimized.

Show comment
Hide comment
@coincapsig

coincapsig Apr 28, 2014

dlio, have you tried to 'make install' from 'db-4.8.30.NC/build_unix/' ? It should put many of the files in their proper places if I remember correctly.

dlio, have you tried to 'make install' from 'db-4.8.30.NC/build_unix/' ? It should put many of the files in their proper places if I remember correctly.

@dlio

This comment has been minimized.

Show comment
Hide comment
@dlio

dlio Apr 28, 2014

Thanks for the quick reply coincapsig.

I have tried this following alexander's method as per the above:
1. Download sources of BerkeleyDb 4.8 2. Go to /build_unix/ 3. ../dist/configure --prefix=/usr/local --enable-cxx 4. make 5. (as root) make install

but doing a locate libdb_cxx still only shows the ibdb_cxx.so and libdb_cxx-4.7.so as being in /usr/lib64/

dlio commented Apr 28, 2014

Thanks for the quick reply coincapsig.

I have tried this following alexander's method as per the above:
1. Download sources of BerkeleyDb 4.8 2. Go to /build_unix/ 3. ../dist/configure --prefix=/usr/local --enable-cxx 4. make 5. (as root) make install

but doing a locate libdb_cxx still only shows the ibdb_cxx.so and libdb_cxx-4.7.so as being in /usr/lib64/

@akstunt

This comment has been minimized.

Show comment
Hide comment
@akstunt

akstunt May 15, 2014

I feel your pain dilo, I have the exact same issue on this build:
Linux version 2.6.32-431.11.2.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Tue Mar 25 19:59:55 UTC 2014

Here is the output from the last 2 lines before ./configure fails.

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing

I have also done as Alex has said above and it did not work for me either.

akstunt commented May 15, 2014

I feel your pain dilo, I have the exact same issue on this build:
Linux version 2.6.32-431.11.2.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Tue Mar 25 19:59:55 UTC 2014

Here is the output from the last 2 lines before ./configure fails.

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing

I have also done as Alex has said above and it did not work for me either.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj May 15, 2014

Member

For those building libcxx from scratch, can you try following the updated steps here?

https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db

This avoids having to install globally.

Member

laanwj commented May 15, 2014

For those building libcxx from scratch, can you try following the updated steps here?

https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db

This avoids having to install globally.

@chill117

This comment has been minimized.

Show comment
Hide comment
@chill117

chill117 Jun 13, 2014

@akstunt .. I had the same issue on Ubuntu 12.04:

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing

Here's how I fixed it:

sudo apt-get install libdb4.8++-dev

Then just run the ./configure again.

@akstunt .. I had the same issue on Ubuntu 12.04:

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing

Here's how I fixed it:

sudo apt-get install libdb4.8++-dev

Then just run the ./configure again.

@laanwj laanwj closed this Nov 25, 2014

@MichaelBrenden

This comment has been minimized.

Show comment
Hide comment
@MichaelBrenden

MichaelBrenden Feb 15, 2016

This exact same problem lives on. Debian 7.9 in Feb 2016.

This solved the problem, sort of:
apt-get install libdb++-dev

The consequent new error was this:
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore)

Adding the above suggestion to configure allowed compilation, but this warning appeared:
configure: WARNING: Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!

This exact same problem lives on. Debian 7.9 in Feb 2016.

This solved the problem, sort of:
apt-get install libdb++-dev

The consequent new error was this:
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore)

Adding the above suggestion to configure allowed compilation, but this warning appeared:
configure: WARNING: Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!

@xiaoxiaoleo

This comment has been minimized.

Show comment
Hide comment
@xiaoxiaoleo

xiaoxiaoleo Aug 9, 2016

@MichaelBrenden my ubuntu wily has the same problems,and use
./configure --with-incompatible-bdb solve the problems .
ref:http://brianchan.us/home/2013/11/26/installing-bitcoin-in-ubuntu/

xiaoxiaoleo commented Aug 9, 2016

@MichaelBrenden my ubuntu wily has the same problems,and use
./configure --with-incompatible-bdb solve the problems .
ref:http://brianchan.us/home/2013/11/26/installing-bitcoin-in-ubuntu/

@ROBERT-MCDOWELL

This comment has been minimized.

Show comment
Hide comment
@ROBERT-MCDOWELL

ROBERT-MCDOWELL Jan 18, 2017

on Fedora 24 (and probably other redhat like)
solved it with
dnf install libdb4-cxx-devel

ROBERT-MCDOWELL commented Jan 18, 2017

on Fedora 24 (and probably other redhat like)
solved it with
dnf install libdb4-cxx-devel

@chenluyong

This comment has been minimized.

Show comment
Hide comment
@chenluyong

chenluyong Aug 4, 2017

I have a headache and I haven't solved this problem

I have a headache and I haven't solved this problem

@ronaldpetty

This comment has been minimized.

Show comment
Hide comment
@ronaldpetty

ronaldpetty Sep 21, 2017

@chenluyong what did you try and what was the outcome?

@chenluyong what did you try and what was the outcome?

@chenluyong

This comment has been minimized.

Show comment
Hide comment
@chenluyong

chenluyong Sep 22, 2017

@ronaldpetty The problem seems to have been solved, but I haven't recorded it

@ronaldpetty The problem seems to have been solved, but I haven't recorded it

@radoeka

This comment has been minimized.

Show comment
Hide comment
@radoeka

radoeka Sep 24, 2017

install libdb-devel

radoeka commented Sep 24, 2017

install libdb-devel

@creativearmy

This comment has been minimized.

Show comment
Hide comment
@creativearmy

creativearmy Nov 12, 2017

On Ubuntu 16.04, here is how I solved it.

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

On Ubuntu 16.04, here is how I solved it.

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

@henriquebastos henriquebastos referenced this issue in henriquebastos/curtocircuito Dec 15, 2017

Closed

Newsletter: Edição 11 #11

@yuexiahandao

This comment has been minimized.

Show comment
Hide comment
@yuexiahandao

yuexiahandao Dec 26, 2017

On centos 7.4 and installed libdb、libdb-devel、libdb-cxx、libdb-cxx-devel, but the version is too high. So I searched lower version at https://www.rpmfind.net.
Use rpm to install

rpm -ivh libdb4-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-4.8.30-13.el7.x86_64.rpm 
rpm -ivh libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm

Then ./configure passed.

On centos 7.4 and installed libdb、libdb-devel、libdb-cxx、libdb-cxx-devel, but the version is too high. So I searched lower version at https://www.rpmfind.net.
Use rpm to install

rpm -ivh libdb4-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-4.8.30-13.el7.x86_64.rpm 
rpm -ivh libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm

Then ./configure passed.

@renguzi

This comment has been minimized.

Show comment
Hide comment
@renguzi

renguzi Dec 28, 2017

@yuexiahandao
your suggestion helped me.thx.

here is my env:

[root@localhost bitcoin]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@localhost bitcoin]# uname -rm
3.10.0-327.el7.x86_64 x86_64
[root@localhost bitcoin]# 

here is the problem:

[root@localhost bitcoin]# ./configure 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
...
...
checking for MSG_NOSIGNAL... yes
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing
[root@localhost bitcoin]#

last,the resolution is:

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-devel-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm

and

rpm -ivh libdb4-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-4.8.30-13.el7.x86_64.rpm 
rpm -ivh libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm​

renguzi commented Dec 28, 2017

@yuexiahandao
your suggestion helped me.thx.

here is my env:

[root@localhost bitcoin]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@localhost bitcoin]# uname -rm
3.10.0-327.el7.x86_64 x86_64
[root@localhost bitcoin]# 

here is the problem:

[root@localhost bitcoin]# ./configure 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
...
...
checking for MSG_NOSIGNAL... yes
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing
[root@localhost bitcoin]#

last,the resolution is:

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-devel-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm

and

rpm -ivh libdb4-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-4.8.30-13.el7.x86_64.rpm 
rpm -ivh libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm​
@bellaj

This comment has been minimized.

Show comment
Hide comment
@bellaj

bellaj Jan 10, 2018

as mentionned in build-linux file you need to install specific berkleydb
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

bellaj commented Jan 10, 2018

as mentionned in build-linux file you need to install specific berkleydb
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

@meatwas

This comment has been minimized.

Show comment
Hide comment
@meatwas

meatwas Jan 11, 2018

May be it will help someone:

I had the issue with error configure: error: libdb_cxx headers missing

My problem was related to the step
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

During first installation, I did everything like in instructions, but for some reason i didn't have choice to input a number to select appropriate mingw (posix). May be I just didn't see it. I've seen this comment "# Set the default mingw32 g++ compiler option to posix." but thought that may be this command will do everything needed.

But during second clean installation I payed more attention and selected appropriate one with posix and then stem with make HOST=x86_64-w64-mingw32 took much much more time and everything become ok and I didn't have this error.

It's regarding official installation build-windows with WSL ubuntu 16

meatwas commented Jan 11, 2018

May be it will help someone:

I had the issue with error configure: error: libdb_cxx headers missing

My problem was related to the step
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

During first installation, I did everything like in instructions, but for some reason i didn't have choice to input a number to select appropriate mingw (posix). May be I just didn't see it. I've seen this comment "# Set the default mingw32 g++ compiler option to posix." but thought that may be this command will do everything needed.

But during second clean installation I payed more attention and selected appropriate one with posix and then stem with make HOST=x86_64-w64-mingw32 took much much more time and everything become ok and I didn't have this error.

It's regarding official installation build-windows with WSL ubuntu 16

@geek96

This comment has been minimized.

Show comment
Hide comment
@geek96

geek96 Feb 12, 2018

Try to install apt install libdb++-dev. It works for me on ubuntu 16.04.

geek96 commented Feb 12, 2018

Try to install apt install libdb++-dev. It works for me on ubuntu 16.04.

@malickf

This comment has been minimized.

Show comment
Hide comment
@malickf

malickf Mar 3, 2018

this code fix it for me :

    wget http://download.oracle.com/berkeley-db/db-4.8.30.zip
    unzip db-4.8.30.zip
    cd db-4.8.30
    cd build_unix/
    ../dist/configure --prefix=/usr/local --enable-cxx
    make
    make install

(source https://cryptoandcoffee.com/mining-gems/install-berkeley-4-8-db-libs-on-ubuntu-16-04/ )

malickf commented Mar 3, 2018

this code fix it for me :

    wget http://download.oracle.com/berkeley-db/db-4.8.30.zip
    unzip db-4.8.30.zip
    cd db-4.8.30
    cd build_unix/
    ../dist/configure --prefix=/usr/local --enable-cxx
    make
    make install

(source https://cryptoandcoffee.com/mining-gems/install-berkeley-4-8-db-libs-on-ubuntu-16-04/ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment