go - 无法安装fabric-sdk-go及其依赖项

标签 go hyperledger-fabric blockchain hyperledger-fabric-sdk-go

我正在尝试在 Linux 虚拟机中使用以下命令下载 Fabric-sdk-go 库及其所有依赖项。

go get -u github.com/hyperledger/fabric-sdk-go/... 

出现以下错误。

# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations
../github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop
        have (<-chan time.Time, string, string)
        want (context.Context, <-chan time.Time, string, string)
# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util
../github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:47:8: cannot convert nil to type csr.KeyRequest
../github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:132:37: cannot use req.KeyRequest (type *csr.KeyRequest) as type csr.KeyRequest in argument to getBCCSPKeyOpts

这可能是因为 go 版本不匹配还是其他什么原因?这是我在 Linux 虚拟机中使用的 go 版本

go version go1.12.8 linux/amd64

最佳答案

如果模块未打开,go get 将获取某些依赖项的错误版本。大多数其他依赖工具也是如此。

第一个错误# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations是由于v0.8.0之间的go-kit差异造成的和 v0.9.0。

第二个错误# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util是由于cfssl版本比支持的更新造成的.

sdk 没有实际的二进制输出,因此在任何情况下我们都不应该go get'ting 它。

关于go - 无法安装fabric-sdk-go及其依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57941472/

相关文章:

performance - Hyperledger Fabric可扩展性

blockchain - Hyperledger Fabric 和 Sawtooth 有什么区别?

xml - Go XML chardata 打印空行

go - 不懂Go中的func strings.TrimLeft

go - 如何在 Go 中使用 alert() 来显示消息框

go - 如何使用 exec.Command() 打开 Chrome 窗口?

arrays - Hyperledger 结构 Node 错误 : 2 UNKNOWN: Stream removed Unhandled error for request GET/api/fabric/1_0/channels:

docker - 网络重启后,Hyperledger Composer Identity Issue错误(代码:20,授权失败)

blockchain - 检索 super 账本完整的世界状态

blockchain - Aeternity 中的跨合约调用