configure,检查依赖
git clone https://github.com/btccom/dogecoin.git
# 安装依赖
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
./autogen.sh
./configure # 检查依赖项
检查结果:缺失 libdb5.1-dev libdb5.1++-dev
sudo apt-get install libdb5.1-dev libdb5.1++-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 libdb5.1-dev,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
E: 软件包 libdb5.1-dev 没有可安装候选
无法安装libdb5.1-dev libdb5.1++-dev,尝试手动安装
wget http://mirrors.kernel.org/ubuntu/pool/universe/d/db/libdb5.1-dev_5.1.29-7ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/d/db/libdb5.1++-dev_5.1.29-7ubuntu1_amd64.deb
sudo dpkg -i libdb5.1*-dev*.deb
手动安装失败,当前机器的版本是:libdb5.3-dev,无法安装 libdb5.1-dev
找到一个解答,使用 ./configure --with-incompatible-bdb
You have a few options here,
You can install whatever bdb version your distro supports (likely 5.8) and indicate --with-incompatible-bdb, in ./configure which will let you do dev without a problem just (potentially, in theory) not allow you to move your wallet.dat to another install.
./configure --with-incompatible-bdb
Second, though the build takes longer, you can build against depends.
configure完成之后,make
configure
完成之后,生成了对应的 make
文件
日志如下:
Options used to compile and link:
with wallet = yes
with gui / qt = no
with zmq = yes
with test = yes
with bench = yes
with upnp = yes
debug enabled = no
werror = no
target os = linux
build os =
CC = gcc
CFLAGS = -g -O2
CPPFLAGS = -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
CXX = g++ -std=c++11
CXXFLAGS = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter
LDFLAGS =
执行 make
命令:
make
make install # optional
不知道make是否正确,尝试了一下居然成功了
cd src
./dogecoind -conf=/opt/dogecoin/dogecoindata/dogecoin.conf -datadir=/opt/dogecoin/dogecoindata