2017-06-02 99 views
0

我在我的chaincode中使用了simplejson庫,當我嘗試部署鏈碼時,出現以下錯誤,如何將此庫安裝到面料容器中?我應該安裝這個庫在訂單或我安裝我的chaincode的同行?如何在面料容器中安裝第三方去庫

當我進入容器(docker exec -it peer0 /bin/bash),並嘗試運行go get github.com/bitly/go-simplejson時,它告訴我無法識別go命令。

2017-06-02 02:31:34.982 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'chaincode' 
2017-06-02 02:31:34.996 UTC [msp] GetLocalMSP -> DEBU 002 Returning existing local MSP 
2017-06-02 02:31:34.996 UTC [msp] GetDefaultSigningIdentity -> DEBU 003 Obtaining default signing identity 
2017-06-02 02:31:35.007 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default escc 
2017-06-02 02:31:35.007 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 005 Using default vscc 
2017-06-02 02:31:35.008 UTC [msp] Sign -> DEBU 006 Sign: plaintext: 0A8E070A5A0803220A73736D6368616E...454D53500A04657363630A0476736363 
2017-06-02 02:31:35.009 UTC [msp] Sign -> DEBU 007 Sign: digest: 819428A66344065ADDA8D72882891E6D2EEB6BDFD4295F7AB1D2E340B0295E16 
Error: Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/ssm/ssm.go:8:2: cannot find package "github.com/bitly/go-simplejson" in any of: 
    /opt/go/src/github.com/bitly/go-simplejson (from $GOROOT) 
    /chaincode/input/src/github.com/bitly/go-simplejson (from $GOPATH) 
    /opt/gopath/src/github.com/bitly/go-simplejson 

回答