安装 go-mtpfs 时出现错误 "undefined: sync.Pool"

标签 go debian

运行命令

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

这是什么意思?我该如何解决这个问题?

最佳答案

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

关于安装 go-mtpfs 时出现错误 "undefined: sync.Pool",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26236734/

相关文章:

go - 是否可以取消未完成的 goroutines?

database - 在 Golang 中执行 SQL 查询

Golang 部门 : having multiple binaries in one source tree

debian - 如何清理源以使用 dpkg-buildpackage 重建包?

php - 最大连接数(Debian、phpmyadmin、apache)

python - 使用python通过Raspberry Pi中的串口向PLC发送数据

go - Go 的 If 语句

json - Go websocket 序列化/反序列化 json

linux - fail2ban 正则表达式停止工作 [Debian 8 - Jessie]

debian - 我无法在 debian 上使用 uwsgi 正确设置 Bottle 的应用程序