1. Home
  2. Docs
  3. golang
  4. FAQ
  5. cannot use stat.Mntfromname

cannot use stat.Mntfromname

mac 错误信息 cannot use stat.Mntfromname

go build -o "gva" cmd/main.go
# github.com/shirou/gopsutil/disk
../../pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:67:51: cannot use stat.Mntfromname[:] (type []byte) as type []int8 in argument to common.IntToString
../../pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:68:49: cannot use stat.Mntonname[:] (type []byte) as type []int8 in argument to common.IntToString
../../pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:69:50: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
../../pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:85:43: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
make: *** [gva] Error 2

处理-切换回底版本 go get golang.org/x/sys@a7d97aace0b0

相关资料

FreeBSD build failing
gopsutil-968

Was this article helpful to you? Yes No

How can we help?