2014-10-07 45 views
9

当运行命令转到错误 “未定义:sync.Pool” 安装细末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 

这是什么意思?我怎样才能解决这个问题?

回答

16

错误消息意味着go-fuse库使用sync.Pool,这是在围棋1.3中引入(该版本的变化:https://golang.org/doc/go1.3),我怀疑你已经安装在系统上的执行不是最新版本(比如Debian的稳定(wheezy)它是1.0.2)。为了使用go-fuse库,您需要使用至少1.3的Go版本。