Compilation of Go Ethereum under Windows

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

I recently need to study Ethereum, research, choose to compile Go-ethereum

Under Windows, the GO package is installed in C:\GO. Environment variables are set in environment variables Goroot=c:\go

Also set the working directory of Go (I used C:\GOWORK), environment variables set environment variable gopath=c:\gowork.

First, install chocolatey.

Start the PowerShell prompt window as an administrator and execute

Set-executionpolicy Remotesigned-scope CurrentUser

And then run

IWR https://chocolatey.org/install.ps1-UseBasicParsing | Iex

After installing chocolatey, the second step installs the Go-ehtereum environment: git, Golang, MinGW. Because I already have git and Golang installed. I only run the following command

Choco Install MinGW

Step three, configure the compilation environment

Open a new command window and run the following command:

Set "Gopath=c:\gowork"

Set "path=c:\gowork\bin;%path%"

Setx Gopath "%gopath%"

Setx Path "%Path%"

mkdir Src\github.com\ethereum

git clone https://github.com/ethereum/go-ethereum Src\github.com\ethereum\go-ethereum

CD Src\github.com\ethereum\go-ethereum

Go get-u-v golang.org/x/net/context

The final compilation, in the C:\GOWORK\src\github.com\ethereum\go-ethereum directory, runs

Go install-v./...

Hola, Exe file generation:

issues encountered in the compilation:

The author two-dimensional code

Note: Original, reproduced please indicate the source

Related Article

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.