I am trying to compile the chaincode_example02 followed by this guide with Option 2 (for Mac). All steps were passed except compiling the code. I have the following error:
cd $GOPATH/src/github.com/chaincode_example02
go build
chaincode_example02.go:30:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of:
/usr/local/Cellar/go/1.7.1/libexec/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT)
($GOPATH not set)
You need to prepare the fabric source as libs follow command. Make sure GOPATH had been set first.
mkdir -p $GOPATH/src/github.com/hyperledger
cd $GOPATH/src/github.com/hyperledger
git clone -b release-1.2 https://github.com/hyperledger/fabric.git