1)_sudo apt-get install bison ed gawk gcc libc6-dev make
2)apt-get install python-setuptools python-dev build-essential
3)hg clone -u release https://go.googlecode.com/hg/ go
4)cd go/src
5)./all.bash
6)在home的当前用户目录下编辑hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
7)编译并链接
cd ~/go/bin
./8g ~/hello.go
./8l ~/hello.8
8)执行
./8.out
*********@********-O-E-M:~/go/bin$ ./8.out
hello, world
二、版本更新
cd go/src
hg pull
hg update release
./all.bash
本文详细介绍如何通过命令行方式安装配置Go语言环境,并提供了一个简单的hello world示例程序来演示Go语言的基本使用方法。此外,还介绍了如何进行Go语言的版本更新。
451

被折叠的 条评论
为什么被折叠?



