Go Install configuration

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

Download Address: https://dl.gocn.io/


Linux Download address: wget https://dl.gocn.io/golang/1.9.2/go1.9.2.linux-amd64.tar.gz


goroot is the installation path to go, gopath, go Install / go get and go tools use Gopath environment variables. gopath is the search path as the compiled binary storage destination and import package (in fact your working directory, you can create your own go source file under SRC and then start working).

    1. Gopath consists of three main directories: bin, pkg, SRC
    2. The bin directory mainly contains executable files; Pkg directory to store compiled library files, mainly *.a files; The source files of go are mainly stored in the SRC directory.
To configure environment variables:
VI ~/.BASHRC

Export goroot=/usr/ Local /go

Export path= $GOROOT/bin: $PATH

export gopath=/usr/ /gopath

Export path= $GOPATH/bin: $PATH

SOURCE ~/.BASHRC

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.