我按照以下链接安装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- 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
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库的版本?有人能帮我吗?
1 回答
以下程序为我解决了这个问题:
错误消息说:'go / src / github.com / hyperledger / fabric-ca / lib / metadata / version.go:58 0x60' . 查看version.go文件向我显示以下注释:
// Version指定fabric-ca-client / fabric-ca-server版本
//它由Makefile定义并传入ldflags
因此,我从go / src / github.com / hyperledger / fabric-ca /做了一个make . 在制作期间,以下消息被打印到屏幕上:
[INFO]服务器版本:1.1.1-snapshot-e656889
在make之后,当我启动go / src / github.com / hyperledger / fabric-ca / bin中的fabric-ca-server时,它的运行正常!