Install the go language development environment in Ubuntu: 1. Ensure that the required command has $ sudoapt-getinstallbisonedgawkgcclibc6-devmakepython-setuptoolspython-devbuild-essential $ sudoeasy_installmercurial 2. Get the code library $ hgclone-rreleasehttp
Install the go language development environment in Ubuntu:
1. Make sure that the required command already exists.
$ Sudo apt-get install bison ed gawk gcc libc6-dev make python-setuptools python-dev build-essential
$ Sudo easy_install mercurial
2. Obtain the code library
$ Hg clone-r release https://go.googlecode.com/hg/ go
3. Install the go Language
$ Cd go/src
$./All. bash
Iv. test whether the installation is successful
Edit source file hello. go
Package main
Import "fmt"
Func main (){
Fmt. Printf ("Hello, Maojie Tang! \ N ");
}
Compile source files
$8g hello. go link source file
$ 8l hello.8 get the executable file 8.out, run it
$./8. out to get the output
Hello, Maojie Tang!