(7) Install Go

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed. Environment variable configuration:
Vi/etc/profile add
Export goroot= $HOME/goexport gobin= $GOROOT/binexport goarch=armexport goos=linux
To ensure that the relevant files can be called anywhere in the filesystem, you need to add the following:
Export path= $GOROOT/bin: $PATH

When developing a Go project, you also need an environment variable to save your working directory
Export Gopath= $HOME/applications/go

Some of the dependent packages that you need:
C Environment-related bison ed gawk gcc Libc6-dev make
Mercurial related mercurial, etc., with the command Hg can check whether the installation, the software is to manage the go version of the source code, you can use
HG clone-r release https://go.googlecode.com/hg/$GOROOT Download source

Go supports x86-64 x86-32 arm three instruction sets, but can only be installed from SRC on arm and cannot be used directly with the compiled installation package.
Download Address: http://www.golangtc.com/static/go/go1.4rc2.src.tar.gz
Put in the $home directory, unzip to get Go folder, CD go/src/, and then./all.bash

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.