Go language (Golang) environment Construction –ubuntu Chapter

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

The go language is the second open source programming language released by Google 2009. The go language is optimized for programming multi-processor system applications, with go-compiled programs that are comparable to C or C + + code, and are more secure and support parallel processes.

Or my own computer, I installed the Ubuntu 12.04 version of the, directly introduced the installation bar! Actually building the environment is very simple!

sudo apt-get install bison ed gawk gcc Libc6-dev make//install the C language Extension pack
sudo apt-get install python-setuptools python-dev build-essential//install mercurial dependent sudo easy_install mercurial                                       // Installing mercurial

Get the Go Language pack

HG Clone-r Release Https://go.googlecode.com/hg/go

Compiling and installing Golang

CD Go/src./all.bash

Ubuntu here is actually installed successfully, to configure path, is our Windows environment variables

Installed Go for linux/386 in/home/widuu/source/goinstalled commands in/home/widuu/source/go/bin*** the need to Add/hom E/widuu/source/go/bin to your PATH.
Export path= $PATH: $HOME/go/bin  //contains the directory address of the bin inside the go language.

Then we'll get a file and try it.

sudo vim hello.gopackage mainimport "FMT" Func Main () {        fmt. Printf ("Hello, micro network \ n")}go build Hello.go./hello

Output Hello, micro network

Reprint Please specify: Micro network emoji language (Golang) environment Construction –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.