go run testversion.go 报错如下
root@ubuntu:~/processNet/processNet# go run testversion.go
# github.com/google/gopacket/pcap
/home/go/src/github.com/google/gopacket/pcap/pcap.go:30:22: undefined: pcapErrorNotActivated
/home/go/src/github.com/google/gopacket/pcap/pcap.go:52:17: undefined: pcapTPtr
/home/go/src/github.com/google/gopacket/pcap/pcap.go:64:10: undefined: pcapPkthdr
这个是testversion.go 的代码
package main
import (
"fmt"
"github.com/google/gopacket/pcap"
)
func main() {
fmt.Println(pcap.Version())
}
已经安装了libpcap,而且C语言测试libpcap可用
求教大神这是什么问题
有疑问加站长微信联系(非本文作者)