LoginSignup
1
0

More than 5 years have passed since last update.

Bitcoin CoreをUbuntu18.10にインストール(Berkley DB 4.8.0インストールに失敗)

Last updated at Posted at 2019-01-27

Ubuntu18.10にBitcoin CoreをインストールしようとしたらBerkley DB4.8.0のコンパイル、インストールで手間取りました。

環境

VirtualBox6.0
上の
Ubuntu18.10(インストール直後)

0.ライブラリ、ツールのインストール

$ sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
$ sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
$ sudo apt-get install libqrencode-dev autoconf openssl libssl-dev libevent-dev
$ sudo apt-get install libmini
$ sudo apt-get install libminiupnpc-dev
$ sudo apt-get install git

1.bitcoinソースの取得

$ mkdir git
$ cd git
$ git clone https://github.com/bitcoin/bitcoin.git

2.Berkley DB 4.8.0の取得、コンパイル

$ cd ~
$ mkdir bitcoin
$ mkdir bitcoin/db4/
$ cd bitcoin/db4/
$ wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
$ tar xvzf db-4.8.30.NC.tar.gz
$ cd db-4.8.30.NC/build_unix/
$ ../dist/configure -enable-cxx -disable-shared -with-pic -prefix=/home/theusername/bitcoin/db4/
$ sudo make install
libtool: compile:  g++ -c -I. -I../dist/.. -D_GNU_SOURCE -D_REENTRANT -O ../dist/../cxx/cxx_db.cpp  -fPIC -DPIC -o cxx_db.o
In file included from ../dist/../dbinc/mutex_int.h:12,
                 from ../dist/../dbinc/mutex.h:15,
                 from ./db_int.h:884,
                 from ../dist/../cxx/cxx_db.cpp:11:
../dist/../dbinc/atomic.h:179:19: error: definition of ‘int __atomic_compare_exchange(db_atomic_t*, atomic_value_t, atomic_value_t)’ ambiguates built-in declaration ‘bool __atomic_compare_exchange(long unsigned int, volatile void*, void*, void*, int, int)’
 static inline int __atomic_compare_exchange(
make: *** [Makefile:2018: cxx_db.o] エラー 1

コンパイルエラーになる。。

3.Berkley DB 4.8.0の取得、コンパイル、インストール(再チャレンジ)

$ sudo add-apt-repository ppa:bitcoin/bitcoin
$ sudo apt-get install libdb4.8-dev libdb4.8++-dev
$ sudo apt-get install libdvel
$ cd ~/git
$ git clone https://github.com/tinybike/get-bdb-4.8.git
$ cd get-bdb-4.8/
$ ./install.sh ../bitcoin/

今度は、インストール成功

4.bitcoinのコンパイル、インストール

$ cd ../bitcoin/
$ ./autogen.sh
$ mkdir ~/bc
$ ./configure --prefix=$HOME/bc
$ make install
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0