Ubuntu Go语言安装记录参考地址:http://golang.org/doc/install.html ?一些区别:?amd64python-setuptools
Ubuntu Go语言安装记录
参考地址:http://golang.org/doc/install.html
?
一些区别:
?
amd64python-setuptools python-dev build-essential?
??? 安装Hg:
$sudo easy_install mercurial???? 获取go源码:
$ hg clone -u release https://go.googlecode.com/hg/ go?
?? 安装:
$ cd go/src$ ./all.bash
?
??? 看到如下信息就是安装成功:
--- cd ../test0 known bugs; 0 unexpected bugs
ALL TESTS PASSED
---
Installed Go for linux/amd64 in /home/zc/opt/go.
Installed commands in /home/zc/opt/go/bin.
The compiler is 6g.
?
??? 验证:
$ cat >hello.go <<EOFpackage main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
EOF
$ 6g hello.go
$ 6l hello.6
$ ./6.out
hello, world
$ go lang 更新:
$ cd go/src
$ hg pull
$ hg update release
$ ./all.bash
