compile bitcoin in ubuntu 17.10-废弃

先下载代码:

git clone https://github.com/bitcoin/bitcoin.git
然后进入到bitcoin目录,将一下文件下载其中,执行即可configure完毕

http://xueguoliang.cn/bitcoin.sh

or

sudo apt-get install vim git qt-sdk qt-default
sudo apt-get install protobuf-compiler
sudo apt-get install autoconf
sudo apt-get install libtools
sudo apt-get install libtool
sudo apt-get install pkg-config
sudo apt-get install libdb5.3-dev
sudo apt-get install libdb++-dev
sudo apt-get install libboost-dev 
sudo apt-get install libboost-system-dev
sudo apt-get install libboost-filesystem-dev 
sudo apt-get install libboost-filesystem-dev 
sudo apt-get install libboost-all-dev
sudo apt-get install libssl-dev
sudo apt-get install libevent-dev 
sudo apt-get install libprobuffer-dev

BITCOIN_ROOT=$(pwd)

# Pick some path to install BDB to, here we create a directory within the bitcoin directory
BDB_PREFIX="${BITCOIN_ROOT}/db4"
mkdir -p $BDB_PREFIX

# Fetch the source and verify that it is not tampered with
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz' | sha256sum -c
# -> db-4.8.30.NC.tar.gz: OK
tar -xzvf db-4.8.30.NC.tar.gz

# Build the library and install to our prefix
cd db-4.8.30.NC/build_unix/
#  Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

# Configure Bitcoin Core to use our own-built instance of BDB
cd $BITCOIN_ROOT
./autogen.sh
./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --with-gui  # (other args...)

标签: none

添加新评论