Ubuntu12.04 installation of the Go language in tar.gz package mode

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

1. Download the Go Language installation package

http://code.google.com/p/go/downloads/detail?name=go1.0.3.linux-386.tar.gz&can=2&q=

2, install the Gcc,go language itself compiler needs GCC compiled.

sudo apt-get install bison gcc libc6-dev ed gawk make Python-setuptools Python-dev build-essential
3. Configure System files

Vim ~/.BASHRC
after the file is added

#--------------------------------Google go--------------------------------export goroot=/opt/golang/go #安装路径, Choose Export goarch=386 #CPU平台export goos=linux #操作系统架构export gopath= $HOME/dropbox/code/go #工作空间路径export path= $PATH by personal preference: $GOROOT/bin #将go语言命令加入系统环境变量
4, new/opt/golang folder, can be customized with personal preferences

Mkdir/opt/golang
5. Unpack the installation package

cd ~/download sudo tar-zxvf go1.0.3.linux-386.tar.gz
move a folder
sudo mv Go/opt/golang
6. Install Go

Cd/opt/golang/go/src./all.bash
7. Make changes to environment variables effective immediately

SOURCE ~/.BASHRC
8. Check if the go installation is successful

Go version
if Go version 1.0.3 appears, that means success .


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.