n9e-v6后台编译报错

Viewed 159

go build -ldflags "-w -s -X github.com/ccfos/nightingale/v6/pkg/version.Version="v6.0.0-263c77cbbfce6ff6793e5c50e5e14204ff2f3fd5"" -o n9e ./cmd/center/main.go

runtime/internal/sys

/opt/go/src/runtime/internal/sys/consts.go:13:7: StackGuardMultiplier redeclared in this block
/opt/go/src/runtime/internal/sys/arch.go:27:7: other declaration of StackGuardMultiplier
/opt/go/src/runtime/internal/sys/consts.go:16:7: DefaultPhysPageSize redeclared in this block
/opt/go/src/runtime/internal/sys/arch.go:36:7: other declaration of DefaultPhysPageSize
/opt/go/src/runtime/internal/sys/consts.go:20:7: PCQuantum redeclared in this block
/opt/go/src/runtime/internal/sys/arch.go:40:7: other declaration of PCQuantum
/opt/go/src/runtime/internal/sys/consts.go:23:7: Int64Align redeclared in this block
/opt/go/src/runtime/internal/sys/arch.go:43:7: other declaration of Int64Align
/opt/go/src/runtime/internal/sys/consts.go:30:7: MinFrameSize redeclared in this block
/opt/go/src/runtime/internal/sys/arch.go:50:7: other declaration of MinFrameSize
/opt/go/src/runtime/internal/sys/consts.go:34:7: StackAlign redeclared in this block
/opt/go/src/runtime/internal/sys/arch.go:54:7: other declaration of StackAlign

go版本:1.18.10

1 Answers

我看了一下我的go版本是1.18.4,你看看注意一下go对应的包别弄错了。我的是macbook m1的芯片,所以是darwin/arm64。

ulric@localhost nightingale % git pull
Already up to date.
ulric@localhost nightingale % make
go build -ldflags "-w -s -X github.com/ccfos/nightingale/v6/pkg/version.Version="v6.0.0-263c77cbbfce6ff6793e5c50e5e14204ff2f3fd5"" -o n9e ./cmd/center/main.go
ulric@localhost nightingale % go version
go version go1.18.4 darwin/arm64
ulric@localhost nightingale %