Last active
September 3, 2023 10:31
-
-
Save kostaz/19729e6d53adc5d1606c to your computer and use it in GitHub Desktop.
Compile Bitcoin on Ubuntu 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assuming the username of the Ubuntu user is "theusername". | |
Preparation | |
----------- | |
``` | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev | |
sudo apt-get install libboost-all-dev | |
sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler | |
sudo apt-get install libqrencode-dev | |
sudo apt-get install libminiupnpc-dev | |
``` | |
Download bitcoin source code | |
---------------------------- | |
``` | |
cd ~ | |
git clone https://github.com/bitcoin/bitcoin.git | |
``` | |
Download and compile Berkley DB 4.8 | |
----------------------------------- | |
``` | |
cd ~ | |
mkdir bitcoin/db4/ | |
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' | |
tar -xzvf db-4.8.30.NC.tar.gz | |
cd db-4.8.30.NC/build_unix/ | |
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/home/theusername/bitcoin/db4/ | |
make install | |
``` | |
Compile Bitcoin with Berkley DB 4.8 | |
----------------------------------- | |
``` | |
cd ~/bitcoin/ | |
./autogen.sh | |
./configure LDFLAGS="-L/home/theusername/bitcoin/db4/lib/" CPPFLAGS="-I/home/theusername/bitcoin/db4/include/" | |
make -s -j5 | |
``` | |
Run Bitcoin Daemon/QT/Client | |
---------------------------- | |
``` | |
./src/bitcoind | |
./src/bitcoin-qt | |
./src/bitcoin-cli | |
``` | |
Please share your experience and provide constructive feedback! | |
Thanks, | |
--- Kosta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Кто может помочь? Делаю форк для своего сайта, пытаюсь скомпилировать namecoin-qt командой make, :
mkdir obj sudo apt-get install build-essential sudo apt-get install libssl-dev sudo apt-get install libboost-all-dev sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install libdb4.8-dev sudo apt-get install libdb4.8++-dev sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libminiupnpc-dev Сбилдим всё: sudo make -f makefile.unix USE_UPNP= cd .. sudo qmake sudo make
При использовании команды make пишет:
g++ -c -m64 -pipe -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DHAVE_BUILD_INFO -DLINUX -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -Ibuild -Ibuild -o build/bitcoin.o src/qt/bitcoin.cpp make[1]: Вход в каталог
/root/namecoin/src/leveldb'make[1]:
libleveldb.a' не требует обновления. make[1]:
libmemenv.a' не требует обновления.make[1]: Выход из каталога
/root/namecoin/src/leveldb' g++ -c -m64 -pipe -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DHAVE_BUILD_INFO -DLINUX -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -Ibuild -Ibuild -o build/bitcoingui.o src/qt/bitcoingui.cpp In file included from src/walletdb.h:9:0, from src/wallet.h:19, from src/init.h:8, from src/qt/bitcoin.cpp:13: src/base58.h: In member function ‘bool CBitcoinAddress::IsValid() const’: src/base58.h:306:13: error: duplicate case value case SCRIPT_ADDRESS: ^ src/base58.h:302:13: error: previously used here case PUBKEY_ADDRESS: ^ src/base58.h:315:13: error: duplicate case value case SCRIPT_ADDRESS_TEST: ^ src/base58.h:311:13: error: previously used here case PUBKEY_ADDRESS_TEST: ^ src/base58.h: In member function ‘CTxDestination CBitcoinAddress::Get() const’: src/base58.h:355:9: error: duplicate case value case SCRIPT_ADDRESS: ^ src/base58.h:349:9: error: previously used here case PUBKEY_ADDRESS: ^ src/base58.h:356:9: error: duplicate case value case SCRIPT_ADDRESS_TEST: { ^ src/base58.h:350:9: error: previously used here case PUBKEY_ADDRESS_TEST: { ^ In file included from src/walletdb.h:9:0, from src/wallet.h:19, from src/qt/bitcoingui.cpp:26: src/base58.h: In member function ‘bool CBitcoinAddress::IsValid() const’: src/base58.h:306:13: error: duplicate case value case SCRIPT_ADDRESS: ^ src/base58.h:302:13: error: previously used here case PUBKEY_ADDRESS: ^ src/base58.h:315:13: error: duplicate case value case SCRIPT_ADDRESS_TEST: ^ src/base58.h:311:13: error: previously used here case PUBKEY_ADDRESS_TEST: ^ src/base58.h: In member function ‘CTxDestination CBitcoinAddress::Get() const’: src/base58.h:355:9: error: duplicate case value case SCRIPT_ADDRESS: ^ src/base58.h:349:9: error: previously used here case PUBKEY_ADDRESS: ^ src/base58.h:356:9: error: duplicate case value case SCRIPT_ADDRESS_TEST: { ^ src/base58.h:350:9: error: previously used here case PUBKEY_ADDRESS_TEST: { ^ make: *** [build/bitcoin.o] Ошибка 1 make: *** Ожидание завершения заданий… make: *** [build/bitcoingui.o] Ошибка 1