业务网络定义错误 - Hyperledger blockchain / IBM zerotoblockchain training

Business network definition error - Hyperledger blockchain / IBM zerotoblockchain training

我正在学习 Hyperledger 区块链,并尝试关注 ZerotoBlockchain (https://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/crse0401.html?Open)

我已经安装了所有组件,但是当我 运行 来自 MyPath/ZeroToBlockchain/Chapter03 的 "buildAndDeploy" 脚本文件时出现以下错误。我正在使用 MacOSX。

错误如下:


✖ Starting business network definition. This may take a minute...

Error: Error trying to instantiate composer runtime. Error: No valid responses from any peers.

Response from attempted peer comms was an error: Error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "# composer/vendor/gopkg.in/olebedev/go-duktape.v3

In file included from chaincode/input/src/composer/vendor/gopkg.in/olebedev/go-duktape.v3/api.go:7:0:

chaincode/input/src/composer/vendor/gopkg.in/olebedev/go-duktape.v3/api.go: In function '_duk_error':

chaincode/input/src/composer/vendor/gopkg.in/olebedev/go-duktape.v3/duktape.h:510:127: warning: right-hand operand of comma expression has no effect [-Wunused-value] (duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), VA_ARGS), (duk_ret_t) 0) ^

chaincode/input/src/composer/vendor/gopkg.in/olebedev/go-duktape.v3/api.go:153:2: note: in expansion of macro 'duk_error' duk_error(ctx, err_code, "%s", str); ^

go build composer: /opt/go/pkg/tool/linux_amd64/link: fork/exec /opt/go/pkg/tool/linux_amd64/link: exec format error "

Command failed


我遇到了同样的问题,但通过添加路径解决了它。 在 Ubuntu 16.04 LTS

#哪个去

/usr/local/go/bin/go

vi .profile

PATH="将此添加到您的路径中 /usr/local/go/bin"

# 来源.profile

# buildAndDeploy

   =====================================================
   -----> starting REST server
   =====================================================

   network archive, start and deploy script for the Zero To Blockchain Series
   This has been tested on Mac OSX thru High Sierra and Ubuntu V16 LTS
   This script will create your Composer archive

参数: 网络名称是:zerotoblockchain-network ================================================ === -----> 测试休息服务器 完成后, 转到您最喜欢的浏览器 然后输入 localhost:3000/explorer ================================================ === ================================================ === -----> 为 admin@zerotoblockchain-network 启动 rest 服务器 v0.15 ================================================ === 从业务网络定义中发现类型... 从业务网络定义中发现的类型 为业务网络定义中的所有类型生成模式... 为业务网络定义中的所有类型生成的模式 将所有类型的模式添加到 Loopback ... 将所有类型的模式添加到 Loopback Web 服务器侦听:http://localhost:3000http://localhost:3000/explorer

浏览您的 REST API

打开浏览器,您将看到与视频完全相同的内容。