Hyperledger Fabric 1.2.0 developer chaincode tutorial go get and build 失败
Hyperledger Fabric 1.2.0 developer chaincode tutorial failed to go get and build
正在尝试关注 hyperledger fabric 1.2.0 developers chaincode tutorial。
我无法通过执行来获取 hyperledger fabric 依赖项
go get -u github.com/hyperledger/fabric/core/chaincode/shim
。我尝试从我的 GOPATH 的 src
目录中删除 hyperledger/fabric
源文件夹作为 suggested here,但相同的错误消息不断弹出:
github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:364:5: hdr.Format undefined (type *tar.Header has no field or method Format)
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:364:15: undefined: tar.FormatPAX
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:7: hdr.Format undefined (type *tar.Header has no field or method Format)
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:17: undefined: tar.FormatPAX
跳过 go get
命令并直接进入 go build
将输出与上述相同的错误。
我也试过installing gnu-tar没用。
重新安装 Golang 的最新稳定版本就可以了。在撰写本文时,stable version of go 是 1.10.3.
问题是由 golang 版本 1.9.3 引起的 tar.FormatPAX
有一个未定义的结构,这是 hyperledger fabric go 源文件之一所需要的。
正在尝试关注 hyperledger fabric 1.2.0 developers chaincode tutorial。
我无法通过执行来获取 hyperledger fabric 依赖项
go get -u github.com/hyperledger/fabric/core/chaincode/shim
。我尝试从我的 GOPATH 的 src
目录中删除 hyperledger/fabric
源文件夹作为 suggested here,但相同的错误消息不断弹出:
github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:364:5: hdr.Format undefined (type *tar.Header has no field or method Format)
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:364:15: undefined: tar.FormatPAX
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:7: hdr.Format undefined (type *tar.Header has no field or method Format)
../github.com/hyperledger/fabric/vendor/github.com/docker/docker/pkg/archive/archive.go:1166:17: undefined: tar.FormatPAX
跳过 go get
命令并直接进入 go build
将输出与上述相同的错误。
我也试过installing gnu-tar没用。
重新安装 Golang 的最新稳定版本就可以了。在撰写本文时,stable version of go 是 1.10.3.
问题是由 golang 版本 1.9.3 引起的 tar.FormatPAX
有一个未定义的结构,这是 hyperledger fabric go 源文件之一所需要的。