Skip to content

DERPER: Fails to install derper with new go version scheme #11537

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

Open
laqua-stack opened this issue Mar 27, 2024 · 5 comments
Open

DERPER: Fails to install derper with new go version scheme #11537

laqua-stack opened this issue Mar 27, 2024 · 5 comments

Comments

@laqua-stack
Copy link

What is the issue?

When I try to install derper with the current go version 1.22.1 I receive the following error:

go: downloading tailscale.com v1.63.0-pre.0.20240327135352-66e4d843c138
go: tailscale.com/cmd/derper@main (in [email protected]): go.mod:3: invalid go version '1.22.0': must match format 1.23

this is issue is likely linked to golang/go#61888

Steps to reproduce

install latest go.
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz

try to install derper
go install tailscale.com/cmd/derper@main

Are there any recent changes that introduced the issue?

go changed their verison scheme to follow 1.xy.z instead of previously 1.xy

see also
golang/go#63370
golang/go#61888

OS

Linux

OS version

Ubuntu 22.04

Tailscale version

1.62.1

Other software

go 1.22.1

Bug report

BUG-c87297b6ad6a6e94cedff582a375fdcd933c49f2da8d6bb37a8bdcae09964a21-20240327174030Z-f3b8d2aa7589d308

@rossminney
Copy link

Also running into this issue. It almost definitely is related the versioning scheme change.

@laqua-stack
Copy link
Author

I found a solution, but the bug was just 40 cm away from the computer.

  • Update to the latest go version:
    sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz will install the latest tar after downloading it.

  • Be aware that the current instructions on golang install/tar the files to /usr/local/bin and not to /usr/bin

  • Make sure that there is not already a go version under /usr/bin and especially not in your PATH env var echo "$PATH" which go

  • Or use absolute path to your go binary directly
    /usr/local/bin/go install tailscale.com/cmd/derper@main did work for me.

Maybe, there can be a hint on the tailscale custom derp documentation page.

@kelivel
Copy link
Contributor

kelivel commented Apr 25, 2024

Hi @laqua-stack, glad you were able to sort that out! I just tried installing a DERP server on two Ubuntu devices using the same steps you recorded, but with version 1.22.2, and I wasn't able to reproduce the behavior you saw. My DERP installed successfully with no error. Can you reproduce the same behavior now with 1.22.2?

@kelivel kelivel added T4 Docs Issue type support and removed needs-triage labels Apr 25, 2024
@laqua-stack
Copy link
Author

laqua-stack commented Apr 25, 2024

Hi @kelivel,
thank you for following up this issue.
The problem was that I had another go version (1.18 in my case) lying under /usr/bin/go that had priority since it was first in the PATH variable. I thought that installing it according to golang’s instruction would replace it. But, obviously it is placed under /usr/local/bin/go instead.

I left this issue open to discuss the possibility to get a hint in the tailscale docs. Obviously, I was not the only one trapped 🤪

@tallmega
Copy link

tallmega commented Nov 8, 2024

go install tailscale.com/cmd/derper@latest
go: tailscale.com/cmd/derper@latest (in [email protected]): go.mod:3: invalid go version '1.23.1': must match format 1.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants