windows install dlv failed
go version: go version go1.24.4 windows/amd64
log:
PS D:\code\ga-test> go install github.com/go-delve/delve/cmd/dlv@latest
go: downloading github.com/go-delve/delve v1.25.0
# golang.org/x/sys/windows
D:\go\pkg\mod\golang.org\x\[email protected]\windows\service.go:97:33: undefined: STANDARD_RIGHTS_REQUIRED
go env:
set AR=ar
set CC=gcc
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_ENABLED=1
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set CXX=g++
set GCCGO=gccgo
set GO111MODULE=
set GOAMD64=v1
set GOARCH=amd64
set GOAUTH=netrc
set GOBIN=
set GOCACHE=C:\Users\overstarry\AppData\Local\go-build
set GOCACHEPROG=
set GODEBUG=
set GOENV=C:\Users\overstarry\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFIPS140=off
set GOFLAGS=
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\OVERST~1\AppData\Local\Temp\go-build2668430069=/tmp/go-build -gno-record-gcc-switches
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=git.minigame.vip
set GOMOD=NUL
set GOMODCACHE=D:\go\pkg\mod
set GOOS=windows
set GOPATH=D:\go
set GOPROXY=https://proxy.golang.org,https://goproxy.cn,https://goproxy.io,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\overstarry\AppData\Roaming\go\telemetry
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.24.4
set GOWORK=
set PKG_CONFIG=pkg-config
I think you should clean your modules cache (go clean -modcache) and try again. This error doesn't make much sense to me, the constant STANDARD_RIGHTS_REQUIRED is defined in security_windows.go, a file in the same directory with no special build tags.
After running go clean -modcache and then reinstalling, I'm still getting the same error.
It's very odd, you should open an issue on https://github.com/golang/go/issues/, this is not a problem with delve I think.
ok
Attempted installation again today, no errors this time