bit-code Linux environment configuration compile run BitcoinTime: 2017-03-04 Source: Linux Web site Author: mosen_huang
Because of the recent learning block chain, need to learn the next Bitcoin source code, so try to compile in Windows and Linux environment, but Windows environment configuration is very cumbersome always in the time to install Qt error, the following post in the Linux environment Configuration and operation Steps (Ubuntu) GitHub Source Link (https://github.com/bitcoin/bitcoin/) (1) Install dependent Package Command Apt-get install installation, if not found the command to install Apt-get (self-search, After installation sudo apt-get update package), if the display permissions are not sufficient then the sudo apt-get Install command is validated: The required dependency packs are: sudo apt-get install make sudo apt-get install gcc sudo apt-get install g++ sudo apt-get install libdb-dev sudo apt-get install libdb++-dev sudo apt-get install libdb5.1 ++-dev sudo apt-get install libboost-dev sudo apt-get install libboost-all-dev sudo apt-get install zlib1g-dev sudo apt-ge T install libssl-dev sudo apt-get install build-essential sudo apt-get install libminiupnpc-dev sudo apt-get install Autoc Onf (2) clone the source code on GitHub git clone https://github.com/bitcoin/bitcoin.git Note: If Git is not installed first install (command: sudo Apt-get install git-core) If Git clone is too slow, you can download the source code directly on the URL and then create the folder Bitcoin and unzip it. (3) Compile run CD Bitcoin will see the entire source of various files, including executable autogen.sh and configuration file configure./autogen.sh If the error is added sudo ./configure the process is to configure the dependencies associated with the operation of the code in your machine and check the necessary environment. The Bitcoin code running mechanism that I learned is multithreaded, the parent process creates the child process, and the parent process returns to the initialization of the process when the child process is running. Consists of the following 12 steps: Step 1:setup set up the 2:parameter interactions parameter interaction (mainly some parameter settings) The stage 3:parameter-to-internal-flags parameter passed into the internal tag (bo OL type variable) step 4:application initialization:dir Lock, Daemonize, Pidfile, debug log application initialization: Lock directory, background run, debug information step 5:verify wal Let database integrity confirm the integrity of the Wallet database step 6:network Initialization Network initialization step 7:load blocks chain load block chain step 8:load Wallet Load Wallet Step 9:import blocks import block data step 10:load peers import peers step 11:start node start nodes (mining program here) Step 12:finished complete So BITC Oin need to check configuration information and network conditions before starting the load block chain After execution. Configure need to see if there is a corresponding error message or warning general warning is permissible if the last run for Bitcoin, but we'd better exclude the warning first error information: So we change the following command to skip DB version detection again:./CONFIGURE–WITH-INCOMPATIBLE-BDB there should be no error at this time, we need to scroll up to see execution results to see if there is a warning warning message If it is warning:libevent not found, sudo apt-get install Libevent-dev after the execution./configure–with-incompatible-bdb if it's warning:zmq. Could not find a version greater than 4 sudo apt-get install Libzmq-dev general to thisYou can already display the final check Results Information page: If warning: the dependencies required for QT apt-get install Libqt4-dev If you also see warning:libprotobuf cannot find the sudo apt-get ins Tall libprotobuf-dev sudo apt-get install Protobuf-compiler to here although there are two warnings not resolved but the configuration has been successful in fact, if the trouble, of course, you can first of all have to do with the not necessary to put together, province's repeated execution. confiure command at this point the final output is: (4) Execute make command sudo made sudo do install run almost 8 minutes has been compiled (5) Execute at this time: BITCOIN-QT can Pull out the client will be prompted to load block data, nearly 120G, all loaded is what we call the full node. |