关于源码的编译参考了下面的文章
http://www.jianshu.com/p/c11485a69d19
http://www.jianshu.com/p/c1a39f8a265a
1.代码环境准备
(1)我的操作系统是Windows 10
HOME版,
(2)虚拟机安装,我使用的版本是VirtualBox
5.2.0,下载地址见下面
https://www.virtualbox.org/wiki/Downloads
一路选择下一步,就安装好了。
(3)Ubuntu在阿里云下载,找到Ubuntu:ubuntu-16.04.3-desktop-amd64.iso,虚拟机内存要>2G,硬盘要大于>20G。
2.编译准备
(1)下载源码
git clonehttps://github.com/bitcoin/bitcoin.git
(2)安装比特币编译和运行环境所需要的依赖包
sudo apt-get installmake
sudo apt-get installgcc
sudo apt-get installg++
sudo apt-get installlibdb-dev
sudo apt-get installlibdb++-dev
sudo apt-get installlibdb5.1++-dev
sudo apt-get installlibboost-dev
sudo apt-get installlibboost-all-dev
sudo apt-get installzlib1g-dev
sudo apt-get installlibssl-dev
sudo apt-get installbuild-essential
sudo apt-get installlibminiupnpc-dev
sudo apt-get installautoconf
(3)遇到的问题
protoc not found
sudo apt-get installprotobuf-compiler
libprotobuf not found
sudo apt-get installlibprotobuf-dev
libzmq version 4.x orgreater not found
sudo apt-get installlibzmq3-dev
还有
sudo apt-get installlibzmq-dev
sudo apt-get installlibqt4-dev
sudoadd-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install-ylibdb4.8-dev libdb4.8++-dev
3.编译代码
(1)cd bitcoin
sudo ./autogen.sh
./configure
(2)sudo make
sudo make install
网友评论