CoinHeavy (OP)
|
|
April 28, 2014, 05:49:40 PM |
|
I am trying to compile bitcoin from source on Centos 6.5. I believe that I am most of the way there. 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 I have tried the following from here: https://github.com/bitcoin/bitcoin/issues/2998Since 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 And then: add to ./src/m4/bitcoin_find_bdb48.m4:
bdbdirlist=/path/to/compiled/db-4.8.30.NC/build_unix/build/include I have also tried: 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 Unfortunately, I can't seem to get BerkeleyDB.4.8 in /usr/local to appear. I have looked via yum: yum search d4 only shows a handful of options. db4-cxx.x86_64 is the likeliest candidate but when trying to install it I see that it is already installed and a 4.7.... version is referenced. So, somehow I have compiled bitcoin on this machine but done so in a way that the libdb_cxx-4.8.so cannot be found. Any help would be much appreciated.
|
|
|
|
|
|
|
|
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
CoinHeavy (OP)
|
|
April 28, 2014, 06:05:07 PM |
|
I have located libdb_cxx-4.8.so in db-4.8.30.NC/build_unix/.libs
If I simply copy or reference this in the correct places, should that resolve the issue? If I use '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, 'bdbdirlist=/root/berkeley-db/db-4.8.30.NC/build_unix/.libs' ?
Copying libdb_cxx-4.8.so do /usr/lib64 does not seem to resolve the issue.
|
|
|
|
Initscri
|
|
April 29, 2014, 07:18:30 AM |
|
|
---------------------------------- Web Developer. PM for details. ----------------------------------
|
|
|
m3
|
|
May 01, 2014, 08:48:12 AM Last edit: May 01, 2014, 09:27:05 AM by m3 |
|
I had the same problem as you and finally was able to figure it out. So the configuration is not recognizing the cxx files. The 2 things I did that made a difference was to modify the m4: add the path to ./src/m4/bitcoin_find_bdb48.m4: bdbdirlist=/path/to/compiled/db-4.8.30.NC/build_unix/build/include Now I know you already tried it but leave the path there and now try to install the berkeley db 4.8 from scratch using these commands: cd build_unix && ../dist/configure --prefix=/usr \ --enable-compat185 \ --enable-dbm \ --disable-static \ --enable-cxx && make Now, as the root user: make docdir=/usr/share/doc/db-4.8.30 install && chown -v -R root:root \ /usr/bin/db_* \ /usr/include/db{,_185,_cxx}.h \ /usr/lib/libdb*.{so,la} \ /usr/share/doc/db-4.8.30 The commands were taken from: http://www.linuxfromscratch.org/blfs/view/svn/server/db.htmlThis setup is mean for db 6.0 but it works fine for 4.8 aswell Hope I helped! and if I did: 1CNdsvPFwm899J6c8JxrM55jPrtPVB1M2X EDIT: It let me compile but when i run bitcoind I get an error while loading shared libraries still something to do with db4.8 EDIT2: Was able to fix the issue with bitcoind not finding some bdb 4.8 dependancy by doing this: export LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.8/lib/ EDIT3: Now I am facing a problem where once I start bitcoind I get this error: bitcoind: key.cpp:135: <unnamed>::CECKey::CECKey(): Assertion `pkey != __null' failed. Any help is appreciated.
|
| THEMERKLE | ... |
| ●.BTC.●.LTC ● XMR.● DASH .● DOGE.● ETH
|
|
|
|
|
CoinHeavy (OP)
|
|
May 03, 2014, 11:40:47 PM Last edit: May 04, 2014, 06:17:52 PM by CoinHeavy |
|
Thanks m3. I am having the same issue. This is due to the version of OpenSSL that ships with CentOS not supporting elliptical curve. Compiling the right version of OpenSSL seems as simple as: echo 'NOTICE: Downloading OpenSSL 1.0.1g...' wget ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/openssl-1.0.1g.tar.gz tar xzvf openssl-1.0.1g.tar.gz cd openssl-1.0.1g echo 'NOTICE: Configuring OpenSSL 1.0.1g...' ./config shared --prefix=/usr/local --libdir=lib echo 'NOTICE: Compiling OpenSSL 1.0.1g...' make echo 'NOTICE: Installing OpenSSL 1.0.1g…' make install However I can't seem to get bitcoind to recognize this (the CEC error persists). There used to be a solution that went like this: sed -i -e 's/$(OPENSSL_INCLUDE_PATH))/$(OPENSSL_INCLUDE_PATH) \/usr\/local\/include)/' Makefile sed -i -e 's/$(OPENSSL_LIB_PATH))/$(OPENSSL_LIB_PATH) \/usr\/local\/lib)/' Makefile sed -i -e 's/$(LDHARDENING) $(LDFLAGS)/$(LDHARDENING) -Wl,-rpath,\/usr\/local\/lib $(LDFLAGS)/' Makefile Unfortunately, this was in the makefile.unix days. Now that autogen.sh and configure are being used, these sed commands don't do anything. I'm not certain how to get the autogen/configure/make/runtime processes pointed at the right version of openSSL. I would also be fine with just replacing the system version of openssl with the one that supports EC but I'm not sure about how to do that either. I think we're close though.
|
|
|
|
mindragon
|
|
May 19, 2014, 10:04:03 PM |
|
Anyone have any more luck installing Bitcoin latest on Centos 6.5? I'm still running 8.x series because of the inability to compile under latest Centos ... The Dependencies listed are all newer that the latest that I can seem to download and compile.
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3598
Merit: 1560
|
|
May 23, 2014, 07:31:55 AM |
|
Anyone have any more luck installing Bitcoin latest on Centos 6.5? I'm still running 8.x series because of the inability to compile under latest Centos ... The Dependencies listed are all newer that the latest that I can seem to download and compile.
Download the bitcoin core 0.9.1 linux binary tarball from bitcoin.org. Use the bitcoind.static executable. No need to compile anything.
|
|
|
|
trny
Newbie
Offline
Activity: 48
Merit: 0
|
|
June 11, 2014, 06:17:55 AM |
|
This is a super late response, but I ran into the exact same problem as you on Ubuntu 14.04 today so I thought I'd share. Built BerkeleyDB 4.8 from scratch which resulted in a successful compile but received the same error when trying to start the daemon.
Turns out a simple "apt-get install libdb4.8++" does the trick.
|
|
|
|
Ashbite
|
|
June 11, 2014, 05:22:25 PM |
|
This is a super late response, but I ran into the exact same problem as you on Ubuntu 14.04 today so I thought I'd share. Built BerkeleyDB 4.8 from scratch which resulted in a successful compile but received the same error when trying to start the daemon.
Turns out a simple "apt-get install libdb4.8++" does the trick.
Exactly what he says, this should do the trick. Ive had this problem before.
|
|
|
|
|
Xialla
Legendary
Offline
Activity: 1036
Merit: 1000
/dev/null
|
|
June 24, 2015, 02:48:38 PM |
|
@zguby: yeah, your manual makes sense, anyway I really can't recommend you to use rpmforge, epel and remi without yum priorities plugin. some details about it: http://wiki.centos.org/PackageManagement/Yum/Prioritiesalso, why disable selinux? there is some special reason for bitcoincore client or you just did it by default?:)
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
|
|
June 24, 2015, 06:08:08 PM |
|
I'd like to know more generally what's going on with the berkleydb ( 4.8 ). I was building an altcoin (a bitcoin clone) on debian the other day and I also had to jump through some hoops. I guess I'm looking for an answer to either of these complementary questions:
1) why does bitcoin-core (and clones) use a db that's not in the repos of standard distros? 2) why do standard distros not have this db?
|
|
|
|
|
tspacepilot
Legendary
Offline
Activity: 1456
Merit: 1076
I may write code in exchange for bitcoins.
|
|
June 25, 2015, 02:38:22 PM |
|
Thanks for the link to that thread, RedDiamond. I just read through it and I'd say I'm basically caught up on the issues at play. I'm hoping that they either start shipping their own C for berkely db (as gmaxwell suggested they would once distros stop carrying it at all) or move to another solution soon. It's silly to have to add old repos in order to build an up-to-date software package.
|
|
|
|
|
|