尝试在GO中安装StackImpact时出现以下错误。有谁知道如何解决它?
嘟嘟..
Microsoft Windows [versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.
C:Usersleonardo>go get github.com/stackimpact/stackimpact-go
# github.com/stackimpact/stackimpact-go/internal
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:96: undefined: syscall.Getrusage
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:102: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:103: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:104: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:105: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:112: undefined: syscall.Getrusage
C:goworksrcgithub.comstackimpactstackimpact-gointernalprocess_reporter.go
:117: rusage.Maxrss undefined (type *syscall.Rusage has no field or method Maxrs
s)
C:Usersleonardo>
您正在尝试编译适用于 Windows 中的 Linux 的代码。 系统调用。Getrusage 是一个 Linux 系统调用。
https://golang.org/src/syscall/zsyscall_linux_amd64.go?s=13296:13347#L546
从
代理版本 1.2.2 开始支持 Windows。