Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

github.com/hyperledger/fabric/core/chaincode/lib/cid import does not work #8

Open
nirmal1988 opened this issue Jan 31, 2018 · 10 comments

Comments

@nirmal1988
Copy link

yacovm,

Saw your commit to
"github.com/hyperledger/fabric/core/chaincode/lib/cid"

The question is: i get following Error if i import it to fabcar example.
and i am using hyperledger latest version: v1.1.0-alpha.

Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/core/chaincode/lib/cid: <go, [list -f {{ join .Deps "\n"}} github.com/hyperledger/fabric/core/chaincode/lib/cid]>: failed with error: "exit status 1"
can't load package: package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of:
/opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)

Do you have any sample which i can refer to implement attribute-based access control

I already referred following:
https://docs.google.com/document/d/1GP5tcN0oK9Zewed9h5pLiM2BowWPhtgFUGXEDKjeGGo

@pkarolis
Copy link

I'm having the same problem. Nirmal1988, did you manage to resolve it?

@nirmal1988
Copy link
Author

nirmal1988 commented Mar 22, 2018 via email

@Navdevl
Copy link

Navdevl commented Mar 27, 2018

git clone -b master https://github.com/hyperledger/fabric $GOPATH/src/github.com/hyperledger/fabric

This will fix the issue. @nirmal1988 @pkarolis

@ed-curran
Copy link

ed-curran commented Apr 12, 2018

Does this fix the issue? I have the cid library in my local gopath, and I can successfully build the go file on my local machine. but my chaincode still fails to install as it can't find the library.

@ed-curran
Copy link

ed-curran commented Apr 12, 2018

update: if I use
docker run -it <fabric-ccenv image id> bash
and navigate to
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode
I can see that the shim directory is there but there is no lib directory.

seems to be a problem with fabric: https://jira.hyperledger.org/browse/FAB-9081?jql=text%20~%20%22github.com%2Fhyperledger%2Ffabric%2Fcore%2Fchaincode%2Flib%2Fcid%22

@asadhayat1068
Copy link

Did any one resolve the issue? if so please post it here...

@Navdevl
Copy link

Navdevl commented May 8, 2018

Do go get -x github.com/hyperledger/fabric and mount it in your CLI. This will fix the issue @asadhayat1068

@VarunVerma3
Copy link

Not able to fix this issue please help.

@asn417
Copy link

asn417 commented Feb 25, 2019

I also have the problem,is there any useful solution?

@shkbassid
Copy link

Do go get -x github.com/hyperledger/fabric and mount it in your CLI. This will fix the issue @asadhayat1068

i fixed the issue it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants