# wget http://go.googlecode.com/files/go1.2rc3.linux-amd64.tar.gz # tar -C /usr/local -xzf go1.2rc3.linux-amd64.tar.gz # cd /home # mkdir gopath # cd ~ # vim .bashrc export GOROOT=/usr/local/go export GOARCH=amd64 export GOOS=linux export GOPATH=/home/gopath export GOBIN=$GOROOT/bin export PATH=$GOPATH/bin:$GOROOT/bin:$PATH # source .bashrc # go build hello.go
有疑问加站长微信联系(非本文作者)