Hyperledger Fabric: can't load package: package github.com/hyperledger/fabric/core/chaincode/shim:

0 votes

I am trying to install Hyperledger Fabric prerequisites. I have installed the go in usr/local/go and set the path. But when i run 

make cryptogen

I get this error:

can't load package: package github.com/hyperledger/fabric/core/chaincode/shim: cannot find package
"github.com/hyperledger/fabric/core/chaincode/shim" in any of:
/usr/local/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT)
/usr/local/go/bin/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) find:
‘/usr/local/go/bin/src/github.com/hyperledger/fabric/core/chaincode/shim’: No such file or directory
Oct 30, 2018 in Blockchain by slayer
• 29,050 points
870 views

1 answer to this question.

0 votes

You can install various golang projects with the $GOPATH variable. e.g.

export GOPATH=/home/username/go
mkdir -p $GOPATH/src/github.com/hyperledger
cd $GOPATH/src/github.com/hyperledger
git clone -b master https://github.com/hyperledger/fabric-samples.git
cd fabric-samples

The fabric-samples source tree can then be accessed from:

$GOPATH/src/github.com/hyperledger/fabric
answered Oct 30, 2018 by Omkar
• 67,380 points

Related Questions In Blockchain

+16 votes
4 answers
+1 vote
2 answers
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,020 points
804 views
+1 vote
2 answers

Where is custom chaincode path Hyperledger Fabric 1.0?

You have to have your chaincode at ...READ MORE

answered Jul 10, 2018 in Blockchain by slayer
• 29,050 points
905 views
0 votes
1 answer
+2 votes
4 answers
0 votes
1 answer

Hyperledger Fabric: cannot run chaincode from github on Ubuntu terminal

Like the error says: *SimpleChaincode does not implement ...READ MORE

answered Oct 31, 2018 in Blockchain by Omkar
• 67,380 points
64 views
0 votes
1 answer