查找go版本

huangapple go评论113阅读模式
英文:

Find go version

问题

为什么我在我的Ubuntu 14.04上找不到go的版本?go version命令的输出没有给我关于go是1.7还是1.8的信息。有什么想法吗?

根据另一篇帖子,我从docker命令中找到了版本,但我想从go命令本身中找到版本。

无法连接到Docker守护程序。Docker守护程序在此主机上运行吗?

英文:

Why can't I find the version of go on my ubuntu 14.04? The output of go version doesn't give me info on whether the go is 1.7 or 1.8. Any ideas?

$ go version
go version xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/amd64
$ uname -a
Linux jin1-hp1 3.19.0-65-generic #73~14.04.1-Ubuntu SMP Wed Jun 29 21:05:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Following another post, I found it from the command of docker, but I would like to find the version from go command itself.

$ docker version
Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:47:50 2016
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

答案1

得分: 10

或许可以编写一个小程序来打印runtime.Version()的结果?

英文:

Perhaps write a small program to print runtime.Version() ?

huangapple
  • 本文由 发表于 2017年5月7日 11:26:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/43827507.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定