英文:
Error when trying to install StackImpact library in GO
问题
我在尝试在GO中安装StackImpact时遇到以下错误。有人知道如何修复吗?
谢谢..
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\leonardo>go get github.com/stackimpact/stackimpact-go
# github.com/stackimpact/stackimpact-go/internal
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:96: undefined: syscall.Getrusage
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:102: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:103: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:104: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:105: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:112: undefined: syscall.Getrusage
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:117: rusage.Maxrss undefined (type *syscall.Rusage has no field or method Maxrs
s)
C:\Users\leonardo>
英文:
I'm getting the below errors when trying to install StackImpact in GO. Does anyone know how to fix it?
Tnx..
Microsoft Windows [versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.
C:\Users\leonardo>go get github.com/stackimpact/stackimpact-go
# github.com/stackimpact/stackimpact-go/internal
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:96: undefined: syscall.Getrusage
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:102: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:103: rusage.Utime undefined (type *syscall.Rusage has no field or method Utime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:104: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:105: rusage.Stime undefined (type *syscall.Rusage has no field or method Stime)
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:112: undefined: syscall.Getrusage
C:\gowork\src\github.com\stackimpact\stackimpact-go\internal\process_reporter.go
:117: rusage.Maxrss undefined (type *syscall.Rusage has no field or method Maxrs
s)
C:\Users\leonardo>
答案1
得分: 1
你正在尝试在Windows上编译适用于Linux的代码。syscall.Getrusage是一个Linux系统调用。
https://golang.org/src/syscall/zsyscall_linux_amd64.go?s=13296:13347#L546
英文:
You're trying to compile a code that's meant for linux in Windows. syscall.Getrusage is a linux system call.
https://golang.org/src/syscall/zsyscall_linux_amd64.go?s=13296:13347#L546
答案2
得分: 0
Windows支持的起始版本是1.2.2。
英文:
Windows is supported starting from agent version 1.2.2.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论