在安装go-mtpfs时遇到了“undefined: sync.Pool”错误。

huangapple go评论91阅读模式
英文:

Go error "undefined: sync.Pool" when installing go-mtpfs

问题

运行以下命令:

sudo go get github.com/hanwen/go-mtpfs

我得到以下输出:

/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/bufferpool.go:41: undefined: sync.Pool
/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/bufferpool.go:54: undefined: sync.Pool
/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/server.go:44: undefined: sync.Pool
/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/server.go:47: undefined: sync.Pool

这是什么意思?我该如何修复这个问题?

英文:

Running the command

sudo go get github.com/hanwen/go-mtpfs

I get the following output:

/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/bufferpool.go:41: undefined: sync.Pool
/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/bufferpool.go:54: undefined: sync.Pool
/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/server.go:44: undefined: sync.Pool
/usr/lib/go/src/pkg/github.com/hanwen/go-fuse/fuse/server.go:47: undefined: sync.Pool

What does this mean? How can I fix this?

答案1

得分: 16

错误消息意味着go-fuse库使用了sync.Pool,该库在Go 1.3中引入(有关该版本的更改:https://golang.org/doc/go1.3),我怀疑您在系统上安装的Go版本较旧(例如,在Debian stable(wheezy)上是1.0.2)。为了使用go-fuse库,您需要使用至少1.3版本的Go。

英文:

The error message means that the go-fuse library uses sync.Pool, which was introduced in Go 1.3 (changes for that release: https://golang.org/doc/go1.3) and I suspect that the Go version you've installed on your system is older (e.g. on Debian stable (wheezy) it's 1.0.2). In order to use the go-fuse library you'll need to use a Go version of at least 1.3.

huangapple
  • 本文由 发表于 2014年10月7日 21:04:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/26236734.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定