2016-11-07 3 views
0

GitHub (https://github.com/IBM-Blockchain/learn-chaincode)의 Bluemix Blockchain 학습서 학습 코드를 따르고 있지만 초기 빌드를 수행 할 때 실패합니다.Bluemix Blockchain 학습 체인 코드 빌드가 패키지를 찾을 수 없습니다.

오류 메시지는 다음과 같습니다

$ go get github.com/hyperledger-archives/fabric/tree/v0.5-developer-preview/core/chaincode/shim 
package github.com/hyperledger-archives/fabric/tree/v0.5-developer-preview/core/chaincode/shim: cannot find package "github.com/hyperledger-archives/fabric/tree/v0.5-developer-preview/core/chaincode/shim" in any of: 
     D:\opt\Go\src\github.com\hyperledger-archives\fabric\tree\v0.5-developer-preview\core\chaincode\shim (from $GOROOT) 
     D:\work\src\github.com\hyperledger-archives\fabric\tree\v0.5-developer-preview\core\chaincode\shim (from $GOPATH) 

그 결과는 디렉토리 hyperledger-아카이브를 채우는 것입니다 :

/d/work/src/github.com/learn-chaincode/start (master) 
$ go build ./ 
chaincode_start.go:23:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: 
     D:\opt\Go\src\github.com\hyperledger\fabric\core\chaincode\shim (from $GOROOT) 
     D:\work\src\github.com\hyperledger\fabric\core\chaincode\shim (from $GOPATH) 

나는 나의 환경을 설정하는 초기 설정을 따랐다.

$ ls $GOPATH/src/github.com/hyperledger-archives/fabric/ 
bddtests/  docs/  LICENSE   peer/  sdk/ 
consensus/  events/ MAINTAINERS.txt protos/ tools/ 
CONTRIBUTING.md examples/ Makefile   pub/  TravisCI_Readme.md 
core/   gotools/ membersrvc/  README.md vendor/ 
devenv/   images/ mkdocs.yml  scripts/ 

그러나 알 수 있듯이 D : \ work \ src \ github.com \ hyperburder-archives \ fabric \ tree는 없습니다.

내가 뭘 잘못하고 있니?

답변

0

Hyperledger 패브릭이 GOPATH 디렉토리 내에 있는지 확인하면이 문제를 해결할 수 있습니다. 은 "Chaincode 개발 환경"섹션의 제목 https://github.com/IBM-Blockchain/learn-chaincode/blob/v1.0/docs/setup.md

은 "지침"관찰되었다 다음과 같은 오류 거의 동일 오류를 언급 : 런 Chaincode 튜토리얼 (https://github.com/IBM-Blockchain/learn-chaincode는) 전제 조건 "Chaincode 개발 환경"절을 참조합니다.

$ go build ./ 
    chaincode_start.go:23:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of: 
    D:\opt\Go\src\github.com\hyperledger\fabric\core\chaincode\shim (from $GOROOT) 
    D:\work\src\github.com\hyperledger\fabric\core\chaincode\shim (from $GOPATH) 

오류 발생 원인은 Hyperledger 패브릭이 GOPATH에 제대로 설치되지 않았기 때문일 수 있습니다.