Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install go version due to missing binpath #3386

Open
AndreasBergmeier6176 opened this issue May 13, 2024 · 8 comments
Open

Cannot install go version due to missing binpath #3386

AndreasBergmeier6176 opened this issue May 13, 2024 · 8 comments
Assignees
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@AndreasBergmeier6176
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
* Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders.
1.89.0
b58957e67ee1e712cebf466b995adf4c5307b2bd
x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.41.4

Describe the bug

When I select the version to install (1.21.10), I get:

Could not install ${goOption.binpath}

Sadly from the error message I cannot debug what is wrong or how to fix it

@gopherbot gopherbot added this to the Untriaged milestone May 13, 2024
@hyangah
Copy link
Contributor

hyangah commented May 16, 2024

Thanks for the report. There was a bug in error printing that we need to fix.
About the root cause - can you open the "Go" output channel and see what's printed there?

Screenshot 2024-05-16 at 4 42 51 PM

There should be a log message that looks like Error installing golang.org/dl/go1.x.x: ....

@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/586255 mentions this issue: extension/src/goEnvironmentStatus: fix error string

@adonovan
Copy link
Member

There is insufficient information here to identify the problem. Could you describe more fully the sequence of steps you tried, and exactly what happened?

@adonovan adonovan added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 17, 2024
gopherbot pushed a commit that referenced this issue May 20, 2024
Should've used `` to enable variable substitution

For #3386

Change-Id: I94bc823b0c959637f6d8b5a22fa90a2a76ba84d8
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/586255
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
@AndreasBergmeier6176
Copy link
Author

Thanks for the report. There was a bug in error printing that we need to fix. About the root cause - can you open the "Go" output channel and see what's printed there?

Screenshot 2024-05-16 at 4 42 51 PM

There should be a log message that looks like Error installing golang.org/dl/go1.x.x: ....

It says:

2024-05-23 08:28:53.258 [error] Error installing golang.org/dl/go1.22.3: failed to install go1.22.3(golang.org/dl/go1.22.3@latest): Error: Command failed: /usr/bin/go install -v golang.org/dl/go1.22.3@latest
golang.org/dl/internal/version
# golang.org/dl/internal/version
../../../../go/pkg/mod/golang.org/dl@v0.0.0-20240507154152-429173cd35bf/internal/version/version.go:537:38: undefined: signalsToIgnore

@hyangah
Copy link
Contributor

hyangah commented May 23, 2024

@AndreasBergmeier6176 Thanks! Have you tried
go install golang.org/dl/go1.22.3@latest from your terminal?

Do you mind what operating system you are using? The signalsToIgnore is defined in
https://github.com/golang/dl/blob/master/internal/version/signal_unix.go and signal_notunix.go.
From the build tag, I see this handles only unix, js, wasip1, plan9, windows.

@AndreasBergmeier6176
Copy link
Author

AndreasBergmeier6176 commented May 24, 2024

Have you tried
go install golang.org/dl/go1.22.3@latest from your terminal?

Gives the same error message

Do you mind what operating system you are using?

Ubuntu 22.04.4
go version go1.18.1 linux/amd64

@hyangah
Copy link
Contributor

hyangah commented May 24, 2024

Thanks.
Looks like recently golang.org/dl/go* changed to require supported go versions for installation.
Unfortunately ubuntu 22.04.4 LTS is still using go1.18, which is already out of the range supported by the Go project https://go.dev/doc/devel/release#policy.

Some options:

  • If you don't want to change the system default go, download a newer go version and configure the "go.toolsManagement.go": "<path_to_the_newer_go_binary>" setting.
  • Install a new version of go in your system and use it as the system default go version (https://go.dev/wiki/Ubuntu or https://go.dev/doc/install#install), or
  • Upgrade to Ubuntu 24.04... (which has go 1.22. After go1.22, the go toolchain auto updates so this type of issues shouldn't happen)

@AndreasBergmeier6176
Copy link
Author

In this case maybe the sensible way would be for this extension to download 1.22 and execute e.g. go install golang.org/dl/go1.22.3@latest using that downloaded version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants