紧急:未为fabric-ca库设置版本

时间:2018-06-29 08:16:19

标签: hyperledger-fabric hyperledger hyperledger-fabric-ca

我点击了以下链接以安装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时,出现以下错误: enter image description here

换句话说,错误显示如下:

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。前往: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-server / 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/fabric-ca/vendor/github.com/spf13/cobra/command.go:692 + 0x2b

主要。(* 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库的版本?有人可以帮我吗?

1 个答案:

答案 0 :(得分: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 /中进行了制作。在制作过程中,以下消息被打印到屏幕上:

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

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