- Debian 7.7
- Bitcoin Core v0.11.0
感想
- 公式ドキュメント通りにやってもインストールできない
- DB5.1が入っているからか、apt(PPA)がうまくいってない
- BerkelyDB 4.8(推奨)にしなくちゃいけなくて面倒
- 結局ソースからコンパイルした
- walletをオフにすれば要らない様子
db4.8 をソースからコンパイル
$ wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
$ echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256s
$ tar -xvf db-4.8.30.NC.tar.gz
$ cd db-4.8.30.NC/build_unix
$ mkdir -p build
$ BDB_PREFIX=$(pwd)/build
$ ../../dist/configure --disable-shared --enable-cxx --with-pic --prefix=$BDB_PREFIX
$ make install
$ cd ../..
DBD_PREFIXは、適宜インストール先を設定。デフォルトは、/usr/local/BerkeleyDB.4.8
gitでbitcoinのソースを取ってくる
$ cd bitcoin
$ git checkout v0.11.0
$ ./autogen.sh
$ ./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" --without-gui
$ make
$ sudo make install
Quote: Compile Bitcoin Core from Source on Ubuntu – Bitzuma
add bitcoin user
adduser bitnode
You are not required to setup a password for this user, you can simply confirm all the fields with
Add the created user to sudoers list:
sudo adduser bitnode sudo
Create a folder for the Bitcoin configuration file in the home folder of new user:
mkdir /home/bitnode/.bitcoin
Failed binary
apt-get install 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
./configure error
checking for Berkeley DB C++ headers... default
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)
apt-get remove db5.1-dev
apt-get remove libdb5.1++
./configure CPPFLAGS=”-I/usr/include -O2″ LDFLAGS=”-L/usr/lib” –without-gui
Error: libdb_cxx headers missing
$ ./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" --without-gui
...
(snip)
...
Checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)
How to fix
install berkeleyDB from the source.
export BDB_INCLUDE_PATH="/usr/local/BerkeleyDB.4.8/include"
export BDB_LIB_PATH="/usr/local/BerkeleyDB.4.8/lib"