Bitcoin Core 下载地址:bitcoin core 选择Linux版
将压缩文件考到对应目录解压:
unzip bitcoin-master.zip
总的安装流程,但是过程中会遇到一些问题:
cd bitcoin-master
./autogen.sh
./configure
make
make install
./autogen.sh
configure failed, please install autoconf first
sudo apt-get install autoconf
./autogen.sh
error: C++ source seen but 'CXX' is undefined
sudo apt-get install libtool
./configure
error: libdb_cxx headers missing
下载 berkeley-db选择18.1.25版本 Berkeley DB 18.1.25.zip
下载完解压,编译,安装。
./configure LDFLAGS="-L/usr/local/BerkeleyDB.18.1/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.18.1/include/" --with-incompatible-bdb
error could not detect the boost libraries
sudo apt-get install libboost-all-dev
./configure LDFLAGS="-L/usr/local/BerkeleyDB.18.1/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.18.1/include/" --with-incompatible-bdb
error openssl not found
sudo apt-get install openssl
sudo apt-get install libssl-dev
./configure LDFLAGS="-L/usr/local/BerkeleyDB.18.1/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.18.1/include/" --with-incompatible-bdb
error libevent not found
sudo apt-get install libevent.dev
make过程中也存在一些问题:
make
g++: internal compiler error: Killed(program cc 1plus)
问题是内存不足导致的,解决办法使用交换分区(1G):
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
make
/bin/bash: ../share/genbuild.sh: Permission denied
cd /bitcoin-master/share
chmod 777 genbuild.sh
安装成功