2

我按照以下链接安装 hyperledger fabric ca:

http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#setting-up-multiple-cas

它指定以下要安装的命令:

去 -u github.com/hyperledger/fabric-ca/cmd/...

我有所有的依赖项:

去版本:1.9.6

GOPATH 环境变量设置正确

安装了 libtool 和 libtdhl-dev 软件包

但是,当我本机运行 fabric-ca-server 时,我收到以下错误: 在此处输入图像描述

简而言之,错误如下所示:

2018/06/29 13:32:20 [INFO] 配置文件位置:/home/abhinay-trana/crypto-config/peerOrganizations/org1.com/ca/root/fabric-ca-server-config.yaml

恐慌:没有为fabric-ca库设置版本

goroutine 1 [运行]:

github.com/hyperledger/fabric-ca/lib/metadata.GetVersion(0x779657, 0xc4202d26c0) /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/lib/metadata/version.go:58 +0x60

github.com/hyperledger/fabric-ca/lib.(*Server).init(0xc4202d26c0, 0xc4202b5000, 0xf6ce32, 0xc420165bf0) /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/lib/ server.go:98 +0x29

github.com/hyperledger/fabric-ca/lib.(*Server).Init(0xc4202d26c0, 0xc4202d2600, 0x0, 0xc420165c50) /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/lib/ server.go:88 +0x38

main.(*ServerCmd).init.func2(0xc42009cd80, 0xc4200f7ec0, 0x0, 0x2, 0x0, 0x0) /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/cmd/fabric-ca-服务器/servercmd.go:102 +0xfc

github.com/hyperledger/fabric-ca/vendor/github.com/spf13/cobra.(*Command).execute(0xc42009cd80, 0xc4200f7d20, 0x2, 0x2, 0xc42009cd80, 0xc4200f7d20) /home/abhinay-trana/go/src/ github.com/hyperledger/fabric-ca/vendor/github.com/spf13/cobra/command.go:643 +0x3e8

github.com/hyperledger/fabric-ca/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42009cb40, 0xd6f246, 0xc420092c30, 0xc420092c30) /home/abhinay-trana/go/src/github.com/ hyperledger/fabric-ca/vendor/github.com/spf13/cobra/command.go:734 +0x2fe

github.com/hyperledger/fabric-ca/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42009cb40, 0xc42011a3c0, 0xc420092c30) /home/abhinay-trana/go/src/github.com/hyperledger/面料-ca/vendor/github.com/spf13/cobra/command.go:692 +0x2b

main.(*ServerCmd).Execute(0xc420092c30, 0x4, 0x1) /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/cmd/fabric-ca-server/servercmd.go:69 + 0x2f

main.RunMain(0xc420094040, 0x4, 0x4, 0xc420165f70, 0xd70a0b) /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/cmd/fabric-ca-server/main.go:45 +0xb0

main.main() /home/abhinay-trana/go/src/github.com/hyperledger/fabric-ca/cmd/fabric-ca-server/main.go:27 +0x45

如何设置 fabric ca 库的版本?有人能帮我吗?

4

1 回答 1

1

以下过程为我解决了这个问题:

错误消息说:'go/src/github.com/hyperledger/fabric-ca/lib/metadata/version.go:58 +0x60'。查看 version.go 文件向我展示了以下评论:

// 版本指定fabric-ca-client/fabric-ca-server版本

// 由 Makefile 定义,用 ldflags 传入

因此,我从 go/src/github.com/hyperledger/fabric-ca/ 做了一个制作。在制作过程中,屏幕上打印了以下消息:

[信息] 服务器版本:1.1.1-snapshot-e656889

制作完成后,当我启动go/src/github.com/hyperledger/fabric-ca/bin中的 fabric-ca-server 时,它运行良好!

于 2018-06-29T10:22:16.907 回答