英文:
No version set for command go
问题
我尝试在Ubuntu机器上使用go version
命令来检查我的go
可执行文件的版本,但是我遇到了以下错误:
No version set for command go
Consider adding one of the following versions in your config file at
golang 1.16.8
golang 1.17.1
我该如何解决这个问题?我没有之前的配置文件经验,我在谷歌上搜索了一下,但是没有找到可以解决这个问题的方法。
英文:
I attempted to check the version of my go
executable with go version
on an Ubuntu machine, however I got the following error:
No version set for command go
Consider adding one of the following versions in your config file at
golang 1.16.8
golang 1.17.1
How do I resolve this? I have no prior experience with config file, I searched on google but I found nothing which could solve this issue.
答案1
得分: 4
这似乎是来自asdf-vm/asdf
的错误消息,它是一个使用单个CLI工具管理多个运行时版本的工具,可以通过插件进行扩展。
你可以在asdf-vm/asdf
问题838中看到该错误消息。
配置文件应该位于$HOME/.tool-versions
中。
要解决这个问题,可以参考这个示例:
asdf plugin add go
asdf install go latest
英文:
That seems to be an error message from asdf-vm/asdf
, a tool which manages multiple runtime versions with a single CLI tool, extendable via plugins.
You can see that error message in asdf-vm/asdf
issue 838.
The config file should be in $HOME/.tool-versions
To resolve this, as in this example:
asdf plugin add go
asdf install go latest
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论