gpt4 book ai didi

go - 找不到 attrmgr(来自 $GOROOT)和 $GOPATH?

转载 作者:数据小太阳 更新时间:2023-10-29 03:44:48 32 4
gpt4 key购买 nike

我正在尝试安装链代码。我在我的链代码中使用了 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

任何建议Ï

最佳答案

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

关于go - 找不到 attrmgr(来自 $GOROOT)和 $GOPATH?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56154424/

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