## Trouble running bitcoin unit tests with test_bitcoin on Ubuntu

1

From Bitcoin Core's test directory (bitcoin/src/test), the executable test_bitcoin is supposed to run the unit tests. When I run test_bitcoin, however, I get:

replication requires locking support
Test setup error: std::runtime_error: CDBEnv::MakeMock : Error 22 opening database environment.


How can I run test_bitcoin? I installed Bitcoin from source.

Also:

I ran configure using the --with-incompatible-bdb flag.

Why don't you install the correct version of bdb? I have the correct .debs in this repository: https://github.com/nickodell/build_bitcoin Does that fix it?

– Nick ODell – 2015-05-17T00:32:16.097

@NickODell When I run build.sh I get: dpkg: regarding .../libdb4.8-dev_4.8.24-1ubuntu1_i386.deb containing libdb4.8-dev: libdb5.3-dev conflicts with libdb4.8-dev libdb4.8-dev (version 4.8.24-1ubuntu1) is to be installed. – DJG – 2015-05-18T21:47:33.727

It's complaining that you already have a different version of libdb installed. – Nick ODell – 2015-05-18T21:49:23.903

1@NickODell I got it to work by uninstalling libdb5.3. I also had to reinstall the 64 bit version of libdb4.8-dev due to some packaging problem, but now it is working. Thanks! Also: how should this be written up as an answer so that users can see that this question already has been answered? – DJG – 2015-05-19T00:44:05.770

## Answers

1

Try installing the correct version of BerkleyDB. (4.8) I have the correct .debs in this repository:

http://github.com/nickodell/build_bitcoin

You may need to uninstall the newer version of libdb first.