go语言安装时间:2022-11-13 08:59:35 1.下载go https://golang.org/dl/ 或者 https://studygolang.com/dl 下载 2.安装go tar zxvf go1.8.1.linux-amd64.tar.gzmv go /usr/localcd /usr/local/ 设置环境变量 vim /etc/profileGO_HOME=/usr/local/goexport PATH=$PATH:$GO_HOME/bin source /etc/profile 3.测试安装是否成功 go version 4.编写hello world cd /usr/local/go/srcmkdir hellocd hellovim hello.go 程序如下: package mainimport "fmt"func main() { fmt.Printf("hello, world\n")} 编译代码 go build hello.go 运行 ./hello