Home > Back-end >  Cannot find "go" binary installed by asdf
Cannot find "go" binary installed by asdf

Time:02-27

I get the following error after installing Go with asdf and trying to open a Go project.

Failed to find the "go" binary in either。GOROOT() or PATH(/usr/bin:/bin:/usr/sbin:/sbin). Check PATH, or Install Go and reload the window.

CodePudding user response:

I fixed this by just restarting VSCode.

Another person also suggest a fix in this issue which I didn't need to do.

  1. Shift Cmd P
  2. Search for: "open settings" and choose "Open Settings (JSON)"
  3. $ go env and Copy GOROOT value (in my case its "/opt/homebrew/Cellar/go/1.17.1/libexec").
  4. Add new record to settings.json: "go.goroot": "Copied/GOROOT/path", in my case its: "go.goroot": "/opt/homebrew/Cellar/go/1.17.1/libexec",
  • Related