Chaincode for Developers - Hyperledger Fabric Tutorial

好久不见. 提交于 2019-12-24 17:16:14

问题


I'm doing the Chaincode Tutorial and I have problems to compile the given chaincode ("Building Chaincode").

If I try to compile the sacc.go with

go get -u --tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim

I get

package plugin: unrecognized import path "plugin" (import path does not begin with hostname)
package context: unrecognized import path "context" (import path does not begin with hostname)

I was thinking about $GOPATH and $GOROOT as problems, so go env gives me

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/name/go"
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

Any ideas how to solve the problem?


回答1:


Looks like you are using Hyperledger Fabric v1.1.0. This requires Go 1.9 or higher. Looks like you are using Go 1.6



来源:https://stackoverflow.com/questions/49451138/chaincode-for-developers-hyperledger-fabric-tutorial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!