Hyperledge 开发环境配置常见问题
一,安装工具
VBOX
vagrant
vagrant proxy
golang
二,下载源代码
hyperledge
gotools
三.
1.
==> default: package golang.org/x/tools/go/gcimporter15: unrecognized import path "golang.org/x/tools/go/gcimporter15" (https fetch: Get https://golang.org/x/tools/go/gcimporter15?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
==> default: Makefile:: recipe for target 'gotool.golint' failed
==> default: make[]: Leaving directory '/opt/gopath/src/github.com/hyperledger/fabric/gotools'
==> default: make[]: *** [gotool.golint] Error
==> default: Makefile:: recipe for target 'build/gopath/bin/golint' failed
==> default: make[]: Leaving directory '/opt/gopath/src/github.com/hyperledger/fabric/gotools'
==> default: make[]: *** [build/gopath/bin/golint] Error
==> default: Makefile:: recipe for target 'gotools' failed
==> default: make: *** [gotools] Error
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

export fabric_path=~/gopath/fabric
mkdir -p $fabric_path/gotools/build/gopath/src/golang.org/x/
git clone https://github.com/golang/tools.git
mv tools $fabric_path/gotools/build/gopath/src/golang.org/x/
cd $fabric_path/devenv
vagrant destroy
vagrant up
2.

是在执行如下命令是出错
curl -L https://github.com/hyperledger/fabric-chaintool/releases/download/$(CHAINTOOL_RELEASE)/chaintool > $@

https://github-cloud.s3.amazonaws.com/releases/52034138/f54fb054-9560-11e6-934a-5272acfba1b8?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161128%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161128T075224Z&X-Amz-Expires=300&X-Amz-Signature=a7eb3348572a9fa9a9bf044e54805cda9e6bbfcdfd6f21e1bd0783bd3964c5d9&X-Amz-SignedHeaders=host&actor_id=10493939&response-content-disposition=attachment%3B%20filename%3Dchaintool&response-content-type=application%2Foctet-stream
最终下载的地址是这个,由于s3.amazonaws.com被墙,所以下载失败;可以手工下载让后覆盖到 build/bin 下继续执行 make peer
解决办法
1)编辑Makefile文件(在宿主机中操作),将130行注释掉
build/bin/chaintool: Makefile
@echo "Installing chaintool"
@mkdir -p $(@D)
#curl -L https://github.com/hyperledger/fabric-chaintool/releases/download/$(CHAINTOOL_RELEASE)/chaintool > $@
chmod +x $@

2)将下载的chaintool复制到指定目录
export fabric_path=~/gopath/fabric
#宿主机中执行
cp ~/Downloads/chaintool $fabric_path/build/bin
cd $fabric_path/devenv
#
vagrant ssh
cd $GOPATH/src/github.com/hyperledger/fabric
make peer
3).
vagrant@hyperledger-devenv:v0.2.1-f046f3c:/opt/gopath/src/github.com/hyperledger/fabric$ make peer
make[]: Entering directory '/opt/gopath/src/github.com/hyperledger/fabric/gotools'
Building github.com/golang/lint/golint -> golint
package golang.org/x/tools/go/gcimporter15: unrecognized import path "golang.org/x/tools/go/gcimporter15" (https fetch: Get https://golang.org/x/tools/go/gcimporter15?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
make[]: *** [gotool.golint] Error
Makefile:: recipe for target 'gotool.golint' failed
make[]: Leaving directory '/opt/gopath/src/github.com/hyperledger/fabric/gotools'
Makefile:: recipe for target '/opt/gotools/obj/gopath/bin/golint' failed
make: *** [/opt/gotools/obj/gopath/bin/golint] Error
Makefile:: recipe for target 'build/docker/gotools' failed
make: *** [build/docker/gotools] Error

#生成gotools二进制文件
make gotools
#复制到build/docker/gotools目录
cp -r ./gotools/build/gopath/bin ./build/docker/gotools/
make peer

4).
build javaenv时下载gradle-2.12-bin.zip很长时间无响应
是由于RUN wget https://services.gradle.org/distributions/gradle-2.12-bin.zip -P /tmp --quiet 命令连接国外服务器太慢导致,可以使用迅雷下载到本地,复制到
$fabric_path/build/image/javaenv目录下,同时修改$fabric_path/image/javaenv下的Dockerfile.in文件后继续执行make peer即可
FROM hyperledger/fabric-baseimage:_BASE_TAG_
#RUN wget https://services.gradle.org/distributions/gradle-2.12-bin.zip -P /tmp --quiet
ADD gradle-2.12-bin.zip /tmp
RUN unzip -q /tmp/gradle-2.12-bin.zip -d /opt && rm /tmp/gradle-2.12-bin.zip
RUN ln -s /opt/gradle-2.12/bin/gradle /usr/bin
ADD payload/javashim.tar.bz2 /root
ADD payload/protos.tar.bz2 /root
ADD payload/settings.gradle /root
WORKDIR /root
# Build java shim after copying proto files from fabric/proto
RUN core/chaincode/shim/java/javabuild.sh
5).
Step : RUN core/chaincode/shim/java/javabuild.sh
---> Running in 868d72341738

修改$fabric_path/core/chaincode/shim/java/build.gradle文件,增加maven的阿里源
buildscript {
repositories {
maven { url "http://maven.aliyun.com/nexus/content/groups/public" }
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.6'
}
}
cp build/docker/gotools/bin/protoc-gen-go build/bin/chaintool build/goshim.tar.bz2 build/image/ccenv/payload
cp: cannot stat 'build/docker/gotools/bin/protoc-gen-go': No such file or directory
Makefile:: recipe for target 'build/image/ccenv/payload' failed
make: *** [build/image/ccenv/payload] Error

cp gotools/build/gopath/bin/* build/docker/gotools/bin
make peer
vagrant下载镜像经常失败的问题
#使用迅雷下载 virtualbox.box
#https://atlas.hashicorp.com/hyperledger/boxes/fabric-baseimage/versions/0.3.0/providers/virtualbox.box
#https://atlas.hashicorp.com/hyperledger/boxes/fabric-baseimage
#复制virtualbox.box文件到 ~/.vagrant.d/boxes/virtualbox.box
vagrant box add -name hyperledger/fabric-baseimage ~/.vagrant.d/boxes/virtualbox.box -c --force
#修改 ~/.vagrant.d/boxes/hyperledger-VAGRANTSLASH-fabric-baseimage文件夹下的文件0的名称为0.3.0
#http://stackoverflow.com/questions/28399324/download-vagrant-box-file-locally-from-atlas-and-configuring-it
vagrant up


Hyperledge 开发环境配置常见问题的更多相关文章
- VUE开发--环境配置(一)(转)
无剑_君关注 0.312019.05.09 11:53:43字数 1,073阅读 19,627 https://www.jianshu.com/p/a494417def99?utm_so ...
- Python开发环境配置
好久没有写博客了,自从6月份毕业后,进入一家做书法.字画文化宣传的互联网公司(www.manyiaby.com),这段时间一直在进行前端开发,对于后端的使用很少了,整天都是什么html.css.jav ...
- Visual studio 通用开发环境配置:SDL,FFMPEG为例
引言 每一个C++库的使用都是从开发环境的配置开始的,其实每个库的配置过程都是大同小异,总结下来有下面几个步骤: 下载库文件,这里假定是已经预先编译完成的. 配置库文件的包含目录(include)和库 ...
- AndroidStudio开发环境配置-Windows
Android Studio开发环境配置-Windows 最近突发奇想,开始研究Android开发.开始时使用Eclipse作为开发IDE,结果各种不好使,首先下载和安装SDK,以及不同版本的Imag ...
- WIN10下java8的开发环境配置与第一个java程序
一.开发环境配置 1.在官网上下载jdk-8u111-windows-x64.exe 2.运行安装包,可以自定义安装路径 3.进入环境变量设置: 计算机右键-->属性-->高级系统设置-- ...
- Mac下golang开发环境配置
go语言在开发效率和运行效率中的优势让很多人青睐,所以有倾向打算转向go语言的开发. 下面介绍在Mac OS X中golang的开发环境配置. 1.安装brew brew是一个mac下的由ruby开发 ...
- win7 x64 vs2010 directShow开发环境配置
近来工作需要,要用dirrectShow写一个视频播放的demo验证自己的想法.开发环境配置了好久都没有成功,最后终于弄完,现在记录下来,以后有同学遇到同样问题,可以以此法解决. windows SD ...
- 基于Eclipse的Hadoop应用开发环境配置
基于Eclipse的Hadoop应用开发环境配置 我的开发环境: 操作系统ubuntu11.10 单机模式 Hadoop版本:hadoop-0.20.1 Eclipse版本:eclipse-java- ...
- XMPP开发环境配置
首先配置XMPP开发环境配置需要的软件 先安装xampp-osx-1.8.3-5-installer.dmg 安装成功后launchpad里会多出一个XAMPP(其他),点开里面的manager-os ...
随机推荐
- lua随机数函数
function rnd(max) --lua的第1次random数不靠谱,取第3次的靠谱 local ret=0 math.randomseed(os.time()) for i=1,3 d ...
- maven项目导入tomcat7源码
大家好,今天给大家分享对于tomcat源码在eclipse上的导入运行.此次为以tomcat7为例. 1去官网tomcat7的下载页面下载源码网址http://tomcat.apache.org/do ...
- iscsi与multipath
2016-10-01/21:07:24 http://www.cnblogs.com/wuchanming/p/4019660.htmlhttp://czmmiao.iteye.com/blog/20 ...
- [zz]利用碎片时间健身
利用碎片时间健身(上) http://v.163.com/zixun/V96957QH6/VBSQ4D861.html#from=zixunplay_recommended 利用碎片时间健身(下) h ...
- Android线程间通信更新UI的方法(重点分析EventBus)
Android的UI更新只能在UI线程中,即主线程.子线程中如果要进行UI更新,都是要通知主线程来进行. 几种实现方式总结如下,欢迎补充. 1.runOnUiThread() 子线程中持有当前Acti ...
- vue组件一
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Oracle补习班第一天
My life is a straight line, turning only for you. 我的人生是一条直线,为你转弯
- 廖雪峰JavaScript学习摘录
一. 1.语法基础: (1)特别注意相等运算符==.JavaScript在设计时,有两种比较运算符: 第一种是==比较,它会自动转换数据类型再比较,很多时候,会得到非常诡异的结果: 第二种是===比较 ...
- Python mysql 操作小类,供大家用用
import binascii import os import linecache import time #add pyDes path #sys.path.append("/data1 ...
- problem during schema create,statement create sequence act_evt_log_seq
今天在调试程序的时候出现"problem during schema create,statement create sequence act_evt_log_seq"这个错误,跟 ...