gpt4 book ai didi

channel - 无法通过 CLI 安装链代码

转载 作者:行者123 更新时间:2023-12-04 06:38:22 24 4
gpt4 key购买 nike

我创建并加入了 channel ,但无法通过 CLI 安装测试链代码。我用Alpha2的时候成功了。

我在 CLI 中收到以下错误消息:

root@18599095828d:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-06-13 08:09:17.401 UTC [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts: no such file or directory] 2017-06-13 08:09:17.401 UTC [msp] getMspConfig -> INFO 002 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/crls: no such file or directory] 2017-06-13 08:09:17.401 UTC [msp] getMspConfig -> INFO 003 MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/config.yaml: no such file or directory] 2017-06-13 08:09:17.424 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP 2017-06-13 08:09:17.424 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity 2017-06-13 08:09:17.425 UTC [golang-platform] getCodeFromFS -> DEBU 006 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining imports: go list: failed with error: "exec: not started"

 Usage:  peer chaincode install [flags]Global Flags:      --cafile string              Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint  -C, --chainID string             The chain on which this command should be executed (default "testchainid")  -c, --ctor string                Constructor message for the chaincode in JSON format (default "{}")  -E, --escc string                The name of the endorsement system chaincode to be used for this chaincode  -l, --lang string                Language the chaincode is written in (default "golang")      --logging-level string       Default logging level and overrides, see core.yaml for full syntax  -n, --name string                Name of the chaincode  -o, --orderer string             Ordering service endpoint  -p, --path string                Path to chaincode  -P, --policy string              The endorsement policy associated to this chaincode      --test.coverprofile string   Done (default "coverage.cov")  -t, --tid string                 Name of a custom ID generation algorithm (hashing and decoding) e.g. sha256base64      --tls                        Use TLS when communicating with the orderer endpoint  -u, --username string            Username for chaincode operations when security is enabled  -v, --version string             Version of the chaincode specified in install/instantiate/upgrade commands  -V, --vscc string                The name of the verification system chaincode to be used for this chaincoderoot@18599095828d:/opt/gopath/src/github.com/hyperledger/fabric/peer#

最佳答案

问题是您不能再将对等容器用作 CLI。您应该改用 fabric-tools 容器。

请注意此处 e2e 撰写文件的更改:https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/docker-compose-cli.yaml#L42

请尝试使用 fabric-tools 图像,应该可以正常工作

仅供引用 - 错误是由于 Go 编译器未包含在 fabric-peer 镜像中,现在使用 CLI 打包链代码时需要编译器

关于channel - 无法通过 CLI 安装链代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44576816/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com