2018년 2월 9일 금요일

Bitcoind build task on Ubuntu 16.0.4 LTS

1. Install git because you need to get the source via git.
    sudo apt install go
2. Install everything listed below to build.
    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
3. After completing the installation, make the appropriate directory and download the bitcoin source via git.
    git clone https://github.com/bitcoin/bitcoin.git
4. The source you received with git is now "v0.9.5rc2", so check with the git tag.
    go tag
5. Build and build Berkley DB 4.8 before building. There are a few things to keep in mind, so proceed as follows.
    Create a directory named db4 in the bitcoin path
     mkdir db4
    Receive and decompress db4 source
     wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
     tar -xzvf db-4.8.30.NC.tar.gz
    Navigate to and build the db.4.8.30.NC/build_unix directory.
     cd db-4.8.30.NC/build_unix/
     ../dist/configure --enable-cxx --disable-shared --with-pic --prefix = / home / theusername / bitcoin / db4 /
     make install
    If you can not install with the privilege issue, run sudo make install once again using the sudo command.
6. bitcoin build last ..
    Run autogen.sh in the bitcoin directory.
     ./autogen.sh
    Sets the path to db4.
     ./configure LDFLAGS = "- L / home / theusername / bitcoin / db4 / lib /" CPPFLAGS =
     Of course theusername is the path it manages.
    Finally build.
     make -s -j5
     T4, T5, T2, T3, T4, T5, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 & T0 = ​​CNoDestination; T1 = CKeyID; T2 = CScriptID; T3 = boost :: detail :: variant :: void_; T4 = boost :: detail :: variant :: void_; T5 = boost :: detail :: variant :: void_; T6 = boost :: detail :: variant :: void_; T7 = boost :: detail :: variant :: void_; T8 = boost :: detail :: variant :: void_; T9 = boost :: detail :: variant :: void_; T10 = boost :: detail :: variant :: void_; T11 = boost :: detail :: variant :: void_; T12 = boost :: detail :: variant :: void_; T13 = boost :: detail :: variant :: void_; T14 = boost :: detail :: variant :: void_; T15 = boost :: detail :: variant :: void_; T16 = boost :: detail :: variant :: void_; T17 = boost :: detail :: variant :: void_; T18 = boost :: detail :: variant :: void_; T19 = boost :: detail :: variant :: void_; typename boost :: add_reference <T> :: type = const CScriptID &] ':
boost :: variant <T0, T1, T2, T3, T4: boost :: add_reference <T> :: type boost :: get (boost :: variant < T15, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19. T0 = ​​CNoDestination; T1 = CKeyID; T2 = CScriptID; T3 = boost :: detail :: variant :: void_; T4 = boost :: detail :: variant :: void_; T5 = boost :: detail :: variant :: void_; T6 = boost :: detail :: variant :: void_; T7 = boost :: detail :: variant :: void_; T8 = boost :: detail :: variant :: void_; T9 = boost :: detail :: variant :: void_; T10 = boost :: detail :: variant :: void_; T11 = boost :: detail :: variant :: void_; T12 = boost :: detail :: variant :: void_; T13 = boost :: detail :: variant :: void_; T14 = boost :: detail :: variant :: void_; T15 = boost :: detail :: variant :: void_; T16 = boost :: detail :: variant :: void_; T17 = boost :: detail :: variant :: void_; T18 = boost :: detail :: variant :: void_; T19 = boost :: detail :: variant :: void_; typename boost :: add_reference <T> :: type = const CScriptID &] '
rpcrawtransaction.cpp: 299: 77: required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of 'sizeof' to incomplete type 'boost :: STATIC_ASSERTION_FAILURE <
     BOOST_STATIC_ASSERT_MSG (
    Because the above error occurs at the time of the final build, I do not understand the source as a whole.
    After finding the source location, you can change it and build it.
     cd src
     nano rpcrawtransaction.cpp
     // The source to be changed.
     // const CScriptID & hash = boost :: get <const CScriptID &> (address);
           const CScriptID & hash = boost :: get <CScriptID> (address);
     Save and rebuild.
   
    When the build is over
    Go to the bitcoin directory and run the following command.
     ./configure
     sudo make install
    To make sure it's installed properly
     which bitcoind will do the following:
      / usr / local / bin / bitcoind
 7. Run the bitcoin daemon / Client.
    Now run bitcoind. However, you can see the following error message again. ㅡ ㅡ.
     bitcoind: error while loading shared libraries: libdb_cxx-4.8.so: can not open shared object file: No such file or directory
    Go to your account in your home root, open the .profile file, and edit it as shown below.
     nano .profile
    Add the line below to the last line.
     export LD_LIBRARY_PATH = "$ LD_LIBRARY_PATH: / usr / local / lib"
    Save and exit
     . Run the .profile.
    Now run the bitcoind daemon.
     bitcoind -daemon
    After the execution, the following output will be displayed.
     It is recommended that you use the following random password:
     rpcuser = XXXXXXX
     rpcpassword = XXXXXXXXXXXXXXXXXXXXXX
      (you do not need to remember this password)
     The username and password MUST NOT be the same.
     If the file does not exist, create it with owner-readable-only file permissions.
     It is also recommended that you set up an alert so that you are notified of problems;
     for example: alertnotify = echo% s | mail -s "Bitcoin Alert" admin@foo.com
    Copy "rpcuser =" and "rpcpassword =" from the above. Then go to the account home root and add the following tasks.
     cd .bitcoin
     nano bitcoin.conf
     Paste and save the contents you copied to the editor.
   
    If you run bitcoind -daemon again, the pool purse bit coin server runs.
    In order to confirm the basic things
    bitcoin-cli Calling getinfo is a process that synchronizes with another node, so you can check the information.

댓글 없음: