Home > front end >  No version set for command go
No version set for command go

Time:03-02

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.

CodePudding user response:

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
  • Related