Chaincode for Developers - Hyperledger Fabric Tutorial

问题描述 投票:1回答:1

我正在做Chaincode教程,我在编译给定的链码时遇到问题(“建立Chaincode”)。

如果我尝试编译sacc.go

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

我明白了

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)

我在考虑$ GOPATH和$ GOROOT作为问题,所以go env给了我

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"

任何想法如何解决问题?

hyperledger-fabric
1个回答
0
投票

看起来您正在使用Hyperledger Fabric v1.1.0。这需要Go 1.9或更高版本。看起来你正在使用Go 1.6

© www.soinside.com 2019 - 2024. All rights reserved.