日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

怎样编译libdb_比特币编译(Ubuntu 16.04)

發布時間:2023/12/9 Ubuntu 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 怎样编译libdb_比特币编译(Ubuntu 16.04) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝比特幣需要的所有庫

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

總結

以上是生活随笔為你收集整理的怎样编译libdb_比特币编译(Ubuntu 16.04)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。