天天看點

編譯bitcoin比特币用戶端 for Ubuntu16.04

我遇到了兩個不太容易解決的問題。

問題一:

checking for Berkeley DB C++ headers... default
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)

           

這個問題就是沒有找到Berkeley DB 4.8 版本,我們需要對這個版本的Berkeley DB進行安裝。

在http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html

這裡可以知道到4.8版本。或者百度搜尋“Berkeley DB”也可也找到下載下傳位置,它已經被oracle收購了。

下載下傳後解壓進入源碼目錄

cd db-4.8.30/build_unix
../dist/configure --enable-cxx
make -j8
sudo make install
           

預設安裝路徑是/usr/local/BerkeleyDB.4.8/這裡。

下面就是最重要的一步了,聲明BerkeleyDB.4.8的位置:

export BDB_CFLAGS=/usr/local/BerkeleyDB.4.8/

           

這樣在configure的時候,就可以找到BerkeleyDB.4.8了。

問題二:

checking for boostlib >= 1.47.0... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Program_Options library is available... yes
configure: error: Could not link against boost_filesystem !

           

提示的是“boost_filesystem”其實不是它,而是沒找到“ boost_program_options”你需要

sudo apt-get install libboost-program-options-dev
           

安裝完成,就可以通過這個問題,遇到下一個問題了,下面的問題,提示比較明确不太容易被卡住。

繼續閱讀