• 安装比特币需要的所有库
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3

sudo apt-get install libboost-all-dev
  • GUI:关于QT的各种库
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

  出现了错误,有些包无法下载:

  解决方法:参考 https://blog.csdn.net/tiny_lxf/article/details/75027865

sudo vim /etc/resolv.conf
修改 nameserver 8.8.8.8

  再次运行上面的GUI安装,成功

  • git源码
sudo apt-get install git
git clone https://github.com/bitcoin/bitcoin.git
  • 安装Berkeley DB:推荐使用Berkeley DB 4.8
cd bitcoin
./contrib/install_db4.sh `pwd`
  • 配置
./autogen.sh
./configure

  出现报错:原因是找不到berkeleyDB的相关头文件导致的(参考 https://blog.csdn.net/xocoder/article/details/78914576

报错:libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (–disable-wallet to disable wallet functionality)

  上面安装db的脚本执行后其实会提示:

When compiling bitcoind, run `./configure` in the following way:

export BDB_PREFIX='/home/zhang/bitcoin/db4'
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...

所以,应当设置bash环境变量BDB_PREFIX为刚才指定的安装目录,并在configure时,提供这个环境变量

解决步骤:

vim ~/.bashrc
export BDB_PREFIX='/home/zhang/bitcoin/db4' source ~/.bashrc
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"
  • 编译
make
make install

出现错误:

[install-libLTLIBRARIES] Error 1

[install-recursive] Error 1

解决方法:

sudo make install
  • 测试
$ which bitcoind
/usr/local/bin/bitcoind
$ which bitcoin-cli
/usr/local/bin/bitcoin-cli

  

bitcoind
bitcoin-qt
bitcoin-cli or
./src/bitcoind
./src/qt/bitcoin-qt
./src/bitcoin-cli

  

安装过程参考:

https://blog.csdn.net/u011609555/article/details/79660086

https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

https://blog.csdn.net/aaadssdffff/article/details/52992688

比特币编译(Ubuntu 16.04)的更多相关文章

  1. Ubuntu 16.04下为Android编译OpenCV 3.2.0 Manager

    http://johnhany.net/2016/07/build-opencv-manager-for-android-on-ubuntu/ 最近想在Android上尝试一下SIFT和SURF匹配算 ...

  2. PHP7 学习笔记(一)Ubuntu 16.04 编译安装Nginx-1.10.3、 PHP7.0.9、Redis3.0 扩展、Phalcon3.1 扩展、Swoole1.9.8 扩展、ssh2扩展(全程编译安装)

    ==================== PHP 7.0 编译安装================== wget http://cn2.php.net/get/php-7.0.9.tar.bz2/fr ...

  3. Ubuntu 16.04 源码编译安装PHP7+swoole

    备注: Ubuntu 16.04 Server 版安装过程图文详解 Ubuntu16镜像地址: 链接:https://pan.baidu.com/s/1XTVS6BdwPPmSsF-cYF6B7Q 密 ...

  4. Ubuntu 16.04 配置安卓5.1编译环境

    Ubuntu 16.04版本 电脑cpu必须是64位 硬盘分配大约100G的空间 1.ubuntu中更新源 $ sudo apt-get update 2.安装 openjdk-8-jdk $ sud ...

  5. Ubuntu 16.04.5下FFmpeg编译与开发环境搭建

    PC环境: Ubuntu 18.04 上面只要安装下面的提示安装即可,基本上不必再下载依赖库的源代码进行编译和安装 编译步骤: 1, 安装相关工具: sudo apt  install -y auto ...

  6. Ubuntu 16.04下编译安装Apache2.4和PHP7结合

    Ubuntu 16.04下编译安装Apache2.4和PHP7结合,并安装PDOmysql扩展. 1.编译安装apache2.4.20 1 第一步: ./configure --prefix=/usr ...

  7. 在Ubuntu 16.04 LTS上用g++和gcc编译C/C++代码错误提示“.../x86_64-linux-gnu/crt1.o: ELF section name out of range”

    (有一些图片我是直接从个人的CSDN博客上复制来的) 最近一个多月来,我曾经多次尝试在Ubuntu 16.04 LTS上使用g++和gcc(这俩好像合起来叫MinGW?)来编译C/C++代码,但是在解 ...

  8. [Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程

    本文转载自:[Android 编译(一)] Ubuntu 16.04 LTS 成功编译 Android 6.0 源码教程 1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6. ...

  9. ubuntu 16.04源码编译和配置caffe详细教程 | Install and Configure Caffe on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/b90033a9/,欢迎阅读! Install and Configure Caffe on ubuntu 16.04 Series ...

  10. Ubuntu 16.04上源码编译和安装pytorch教程,并编写C++ Demo CMakeLists.txt | tutorial to compile and use pytorch on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/54e7a3d8/,欢迎阅读最新内容! tutorial to compile and use pytorch on ubuntu ...

随机推荐

  1. CSS-posiziton

    1. 想要实现,”返回顶部”永远位于页面的右下角.需要用到position函数.CSS:层叠样式表.用到了分层的功能. position:fixed;  永远固定在一个地方. <!DOCTYPE ...

  2. Json-转自菜鸟教程

    1. python中为什么用json有什么作用??不是python用json,json是类似xml的一种通用格式,在很多地方都可以用.json相比xml,数据量更小,而且可以很方便的和解释型语言的结构 ...

  3. BZOJ5343 & 洛谷4602 & LOJ2555:[CTSC2018]混合果汁——题解

    https://www.luogu.org/problemnew/show/P4602 https://loj.ac/problem/2555 https://www.lydsy.com/JudgeO ...

  4. BZOJ2732:[HNOI2012]射箭——题解

    https://www.lydsy.com/JudgeOnline/problem.php?id=2732 https://www.luogu.org/problemnew/show/P3222#su ...

  5. 51NOD 1773:A国的贸易——题解

    http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1773 参考1:FWT讲解 https://www.cnblogs.com ...

  6. CC DGCD:Dynamic GCD——题解

    https://vjudge.net/problem/CodeChef-DGCD https://www.codechef.com/problems/DGCD 题目大意: 给一颗带点权的树,两个操作: ...

  7. [LNOI] 相逢是问候 || 扩展欧拉函数+线段树

    原题为2017六省联考的D1T3 给出一个序列,m次操作,模数p和参数c 操作分为两种: 1.将[l,r]区间内的每个数x变为\(c^x\) 2.求[l,r]区间内数的和%p 首先,我们要了解一些数论 ...

  8. 将微服务注册到Eureka Server

    一.微服务程序编写 1.在已写好的微服务程序中添加pom依赖: <dependency> <groupId>org.springframework.cloud</grou ...

  9. ZOJ 2532 Internship 求隔边

    Internship Time Limit: 5 Seconds      Memory Limit: 32768 KB CIA headquarter collects data from acro ...

  10. hadoop设置公平队列

    http://hadoop.apache.org/docs/r1.2.1/fair_scheduler.html fair-scheduler.xml文档 <?xml version=" ...