Linux Go language Download installation

Source: Internet
Author: User

1. Download the installation package

First look at whether CentOS or Ubuntu is 64-bit or 32-bit, showing that 64 is 64-bit:
Then download the go-linux-64 bit source package, you can manually wget installation:

wget http://www.golangtc.com/static/go/1.10.1/go1.10.1.linux-amd64.tar.gz

当然也可以去官网下载,建议安装go1.10.1,是目前比较稳定的版本:
    • 1
      Https://golangtc.com/download
    • 2
      Https://studygolang.com/dl
2, decompression installation, configuration environment
    • Unpacking the installation package

      sudo tar-xzf go1.10.1.linux-amd64.tar.gz-c/usr/local

    • Use VI to add the following in the environment variable configuration file/etc/profile:

      Vi/etc/profile or VI $HOME/.profile

    • Add the following content

      # GO PATHexport PATH=$PATH:/usr/local/go/bin#GO GOPATHexport GOPATH=/home/golang
    • Make the profile configuration effective immediately:

      SOURCE $HOME/.profile (for current user)
      Source Etc/profile (for root)

View go version or environment variables

Go version #查看go版本
Go env #查看go环境变量

Summary:

In the Linux installation will encounter the configuration environment path problems, such as Gopath and Gopath not set up the problem, there is sudo go no command to find the problem, so find the problem to learn to find ideas to solve the problem.

Linux Go language Download installation

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.