Debian 8 Installation Golang

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

Debian 8 Installation Golang

    • Download
      Https://golang.org/doc/install?download=go1.7.1.linux-amd64.tar.gz

    • Unzip to a location
      such as:/home/lee/syspath

    • Setting Environment Variables
      Edit the. profile file at the end of the Add (note path)
      Export Goroot=/home/lee/syspath/go
      Export path=$PATH: $GOROOT/bin
      Export Gopath=/home/lee/workspace/go
      *goroot Decompression path for Golang
      *gopath to Golang workspace path (custom path)

    • Test

      lee-summer@lee:~$ Go version
      Go version go1.7.1 linux/amd64

    • Run
      Create a Hello.go file

package mainimport"fmt"func main() {    fmt.Printf("Hello, World GO \n")}

Konsole Run

lee-summer@lee:/home/lee/workspace/go$ Go Run hello.go
Hello, World GO

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.