ubuntu 17 编译BTCoin

一. 安装开发环境

sudo apt-get update
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev

sudo apt-get install libboost-all-dev

sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

sudo apt-get install libqrencode-dev

sudo apt-get install libminiupnpc-dev

sudo apt-get install git

二.下载源码

mkdir btcoin
git clone https://github.com/bitcoin/bitcoin.git

三.编译

./autogen.sh
./configure
make
make install # optional

四.问题

1. configure步骤提示 error: libevent not found.

sudo apt-get install libevent-dev

2. 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)

wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/
cd build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/usr/local
sudo make install

 

网上的教程很乱,具体碰到问题,大家可以参考doc文件目录里面的build-XX说明文件,很详细。

posted @ 2018-01-27 22:36  风雷云雪电  Views(545)  Comments(0Edit  收藏  举报