Install go compilation environment in Ubuntu

Source: Internet
Author: User
Tags install go mercurial

Install go compilation environment in Ubuntu

  Good memory is not as bad as writing, so the Golang compilation environment to record the installation process.

First download some dependent packages:

sudo Install gawk GCC  Make

  Then install mercurial. Mercurial is a version management system that Golang uses to manage versions.

sudo Install python-setuptoolssudoinstall python-devsudo  Install build-essentialsudoinstall Mercurial

After the installation is complete, start the clone Golang source code.

HG Clone-r release https://go.googlecode.com/hg/go

This step depends on the specific speed, it may be slower. So don't be a bit impatient ...

When we see clone complete, we begin to modify the environment variables.

# gosrc,godist is the directory I created. Need to modify export goroot= $HOME/gosrc/goexport GOOS=linuxexport PATH=${path}: $HOME/gosrc/go/ binexport Gopath= $HOME/godist/bin

Ready to start compiling.

CD $GOROOT/src. /all.bash

This step will be over in a moment. Then execute go if the usage occurs, it means success!

Install go compilation environment in Ubuntu

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.