在 Linux 上安装 Go
export GOROOT=$HOME/goexport PATH=$PATH:$GOROOT/binexport GOPATH=$HOME/Applications/Gosudo apt-get install bison ed gawk gcc libc6-dev makewget https://storage.googleapis.com/golang/go<VERSION>.src.tar.gz tar -zxvf go<VERSION>.src.tar.gz sudo mv go $GOROOTcd $GOROOT/src ./all.bash‘make[2]: Leaving directory `/localusr/go/src/pkg/net’export DISABLE_NET_TESTS=1package main func main() { println("Hello", "world") }package main import ( "fmt" "runtime" ) func main() { fmt.Printf("%s", runtime.Version()) }
链接
Last updated
