• bitcoin core 编译


    https://www.cnblogs.com/zhang-qc/p/8677417.html

    • 安装比特币需要的所有库
    1
    2
    3
    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 #这个如果不装,make提示缺少boost的文件
    • GUI:关于QT的各种库
    1
    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

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

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

    • git源码
    1
    sudo apt-get install gitgit clone https://github.com/bitcoin/bitcoin.git
    • 安装Berkeley DB:推荐使用Berkeley DB 4.8
    1
    2
    cd bitcoin
    ./contrib/install_db4.sh `pwd`
    • 配置
    1
    2
    ./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时,提供这个环境变量

    解决步骤:

    1
    2
    3
    4
    5
    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"
    • 编译
    1
    2
    make
    make install

    出现错误:

    [install-libLTLIBRARIES] Error 1

    [install-recursive] Error 1

    解决方法:

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

      

    1
    2
    3
    bitcoind
    bitcoin-qt
    bitcoin-cli<br><br>or<br>./src/bitcoind <br>./src/qt/bitcoin-qt <br>./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

  • 相关阅读:
    博客模仿
    实体零售的数据分析与信息化之路
    巡店系统如何应用于连锁加盟店管理
    Dynamics CRM 常用的JS
    公众号被动消息回复原理
    form分辨率
    打开新网页 浏览图片
    网页浏览文件
    Model赋值返回json
    装载 反射
  • 原文地址:https://www.cnblogs.com/dhcn/p/14623779.html
Copyright © 2020-2023  润新知