Block chain-An introduction to the development environment of Ethernet Square

Source: Internet
Author: User
Tags install node

Before starting to learn each technology, the first task is to build a variety of development environment, and the development environment of block chain is more troublesome. Here we come to a complete realization. The following actions are done under Mac.

(1) Install PYTHON2.7,MAC Use the following command directly in the terminal:

Brew Install Python (note python is lowercase)

(2) Install SOLC (solidity language compiler) and execute the following command in the terminal:

sudo npm install-g Solc

Also need to install SOLC-CLI:

sudo npm install-g solc-cli

You can install both SOLC and SOLC-CLI using the following command, which is recommended for installation with this command:

sudo npm install-g solc solc-cli--save-dev

(3) Install Ethereum/cpp-ethereum (ether Square client Geth), execute the following order in sequence:

Brew Update

Brew Upgrade

Brew Tap Ethereum/ethereum

Brew Install Cpp-ethereum

Brew Linkapps Cpp-ethereum

or execute the following command directly:

Brew Tap Ethereum/ethereum

Brew Install Ethereum

(4) Installation of TESTRPC (as a local test environment for the etheric square, can be used to deploy intelligent contracts, easy to debug development)

Pip Install Eth-testrpc

Upgrade PIP:

python-m Pip Install-upgrade pip

There may be an exception after installation ... scrypt/index.js, reference: http://blog.csdn.net/wo541075754/article/details/53155578 this blog.

(5) Install node.js, download and install directly from the official website:

https://nodejs.org/en/

(6) Install truffle (truffle can quickly compile and deploy smart contracts locally)

NPM Install-g Truffle

(7) Hint: You may install node Package management tool NVM,NVM installation needs to be configured in environment variables as follows, you need to add in. Bash_profile:

Export nvm_dir= "~/.NVM" [-S "$NVM _dir/nvm.sh"] &&. "$NVM _dir/nvm.sh" # This loads NVM (8) After installing Geth and SOLC, found that Geth cannot be compiled in the solidity console, the following is the solution:

The following commands are recommended for implementation on the Web:

Brew Update brew upgrade brew Tap Ethereum/ethereum Brew Install solidity brew Linkapps solidity

However, after performing the last brew Linkapps solidity, there is no return in the terminal, which actually indicates that the last line of command failed to execute.

When we finish the brew install solidity, the terminal prompts to use the "Brew link solidity" link instead of using "Brew Linkapps solidity" online.

So execute the brew link solidity. The terminal prompts you to force the link and rewrite it, and then execute the command as follows:

Brew Link--overwrite solidity

After you perform the steps above, you can find the Solc compiler in Geth:

Eth.getcompilers ()

Or

Web3.eth.getCompilers ()

You can return to the compiler name.


The following may also be the solution, you can try:

View the SOLC installation path through which Solc, and then type in the Geth console:

ADMIN.SETSOLC ("Path of Solc")

After the completion of the above steps, the block chain development environment is basically built up. However, during the installation process, there will still be a lot of pits, such as network reasons. The author in the implementation of a certain number of commands, has been unsuccessful, but changed a place of the network, the installation is very smooth. I will share with you in the next blog How to use these software, as well as the development of block chain applications, intelligent contract writing and other technologies.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.