在执行时
go get -u github.com/hyperledger/fabric-ca/cmd/我得到以下错误:
go get: installing executables with 'go get' in module mode is deprecated.
Use 'go install pkg@version' instead.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
# github.com/hyperledger/fabric-ca/internal/pkg/util
/opt/go/pkg/mod/github.com/hyperledger/fabric-ca@v1.5.2/internal/pkg/util/csp.go:117:12: undefined: bccsp.RSA2048KeyGenOpts
/opt/go/pkg/mod/github.com/hyperledger/fabric-ca@v1.5.2/internal/pkg/util/csp.go:119:12: undefined: bccsp.RSA3072KeyGenOpts
/opt/go/pkg/mod/github.com/hyperledger/fabric-ca@v1.5.2/internal/pkg/util/csp.go:121:12: undefined: bccsp.RSA4096KeyGenOpts
# github.com/hyperledger/fabric-ca/lib/server/operations
/opt/go/pkg/mod/github.com/hyperledger/fabric-ca@v1.5.2/lib/server/operations/system.go:173:23: not enough arguments in call to s.statsd.SendLoop
have (<-chan time.Time, string, string)
want (context.Context, <-chan time.Time, string, string)go版本
go版本go1.17.2 linux/amd64
发布于 2021-10-14 07:01:43
go 1.17.2不是fabric-ca 1.5.2的支持版本请在此处https://github.com/hyperledger/fabric-ca/releases/tag/v1.5.2查看发行说明中支持的版本
然而,依赖也有一个问题,它改变了一个api,在go get上使用-u选项意味着它将下载并使用一个不兼容的版本。这仅适用于服务器,对于服务器也是如此
go get github.com/hyperledger/fabric-ca/cmd/fabric-ca-server应该可以工作,但您也可以这样做
go get github.com/hyperledger/fabric-ca/cmd/...也包括一个客户端构建
当然,您可以只从https://github.com/hyperledger/fabric-ca/releases/tag/v1.5.2获得官方构建
https://stackoverflow.com/questions/69565838
复制相似问题