针对开发人员的Chaincode-Hyperledger Fabric教程 [英] Chaincode for Developers - Hyperledger Fabric Tutorial

查看:67
本文介绍了针对开发人员的Chaincode-Hyperledger Fabric教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做Chaincode教程,但是在编译给定的Chaincode("Building Chaincode")时遇到了问题.

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

如果我尝试使用sacc.go进行编译

If I try to compile the sacc.go with

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给了我

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?

推荐答案

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

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

这篇关于针对开发人员的Chaincode-Hyperledger Fabric教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆