Amadeus-1048 / fabric-mims

A medical information management system based on blockchain and Hyperledger Fabric. —— 基于区块链的医疗信息管理系统
MIT License
19 stars 4 forks source link

链码中加入ipfs应用 #2

Open yyds-wwj opened 5 months ago

yyds-wwj commented 5 months ago

我在尝试在链码中加入ipfs应用的时候,出现了·这个问题,请问怎么解决呢,包确实已经导入了 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/chaincode/pkg/utils/ipfs.go:7:2: cannot find package "github.com/ipfs/boxo/path" in any of: /opt/go/src/github.com/ipfs/boxo/path (from $GOROOT) /chaincode/input/src/github.com/ipfs/boxo/path (from $GOPATH) /opt/gopath/src/github.com/ipfs/boxo/path

Amadeus-1048 commented 5 months ago

看起来不是链码的问题,可能是你的GOPATH或者GOROOT环境变量设置的有问题?

yyds-wwj commented 5 months ago

谢谢博主,这是chaincode下的 go.mod 是成功导入的require ( github.com/hyperledger/fabric v1.4.12 github.com/ipfs/boxo v0.20.0 github.com/ipfs/go-ipfs-files v0.3.0 github.com/ipfs/kubo v0.28.0 ) GOPATH='/Users/wenjunwang/go' GOROOT='/Users/wenjunwang/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.4.darwin-arm64' 难道是docker里cli的goroot配置和goland下的不一样么

Amadeus-1048 commented 5 months ago

GOROOT感觉一般不长这样诶,你是装了多个版本的GO吗

yyds-wwj commented 5 months ago

GOPATH='/root/go' GOPRIVATE='' GOPROXY='https://goproxy.cn,direct' GOROOT='/usr/local/go' 之前是mac上的版本,这个是我虚拟机上的root和path