【问题标题】:can't find attrmgr (from $GOROOT) and $GOPATH?找不到 attrmgr(来自 $GOROOT)和 $GOPATH?
【发布时间】:2019-05-15 17:06:47
【问题描述】:

我正在尝试安装链代码。我在链代码中使用了 cid 包当我尝试安装链代码时,出现以下错误: 无法加载包:

package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of:
/opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)

我使用了滑翔工具(这里是https://github.com/Masterminds/glide)来修复它, 现在我看到另一个我无法修复的错误是:

Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/core/chaincode/lib/cid/cid.go:29:2: cannot find package "github.com/hyperledger/fabric/common/attrmgr" in any of:
    /chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric/common/attrmgr (vendor tree)
    /chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/common/attrmgr
    /opt/go/src/github.com/hyperledger/fabric/common/attrmgr (from $GOROOT)
    /chaincode/input/src/github.com/hyperledger/fabric/common/attrmgr (from $GOPATH)
    /opt/gopath/src/github.com/hyperledger/fabric/common/attrmgr

任何建议,

【问题讨论】:

    标签: go hyperledger-fabric glide-golang


    【解决方案1】:

    在你的 GOPATH 中安装结构依赖,go get -u github.com/hyperledger/fabric

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多