2016-11-07 20 views
0

GitHub(https://github.com/IBM-Blockchain/learn-chaincode)のBluemix Blockchainチュートリアルラーニングチェーンコードに従っていますが、初期ビルド時に失敗します。Bluemix Blockchainラーニングチェーンコードビルドがパッケージを見つけることができません

エラーメッセージは次のとおりです。

/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) 

私は私の環境を設定するための初期セットアップを追っ:

$ 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-アーカイブを移入することです。

$ 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ありません見ることができるように:仕事\ \ SRC \ github.com \ hyperledger-アーカイブ\ファブリック\ツリーが。

私は間違っていますか?

答えて

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に正しくインストールされていなかったことが考えられます。

関連する問題