英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论