ubuntu安装go lang-32位
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 mainimport "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
?
?