运行make dist-clean all或进行单元测试时出现以下错误
unit-tests_1 | executetransaction_pvtdata_test.go:56:错误 初始化链码tmap(错误部署链码(2):错误 起始容器:无法生成特定于平台的docker build: 从build返回错误:1 " chaincode /输入/ SRC / github.com / hyperledger /织物/示例/ chaincode /去/图/ map_experimental.go:17:2: 找不到包裹 " github.com/hyperledger/fabric/core/chaincode/shim"在任何一个:
unit-tests_1 | /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim(来自 $ GOROOT)
unit-tests_1 | /chaincode/input/src/github.com/hyperledger/fabric/core/chaincode/shim (来自$ GOPATH)
unit-tests_1 | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
unit-tests_1 | chaincode /输入/ SRC / github.com / hyperledger /织物/示例/ chaincode /去/图/ map_experimental.go:18:2: 找不到包" github.com/hyperledger/fabric/protos/peer"在任何 的:
unit-tests_1 | /opt/go/src/github.com/hyperledger/fabric/protos/peer(来自 $ GOROOT)
在我的$ GOPATH / src / github.com / hyperledger / fabric上安装Fabric 1.1后,我得到了上面的错误。
我在各自的目录中都有Shim和Peer,但是当我从fabric目录运行make unit-test时,Make似乎没有找到它。这是Ubuntu 16.4 S
我收到的第一条消息是
**balee@balee-VirtualBox:~/go/src/github.com/hyperledger/fabric$ sudo make unit-test
[sudo] password for balee:
find: ‘/src/github.com/hyperledger/fabric/core/chaincode/shim’: No such file or directory
cd unit-test && docker-compose down
WARNING: The TEST_PKGS variable is not set. Defaulting to a blank string.
WARNING: The JOB_TYPE variable is not set. Defaulting to a blank string.**
"
当我的GOPATH是$ HOME / go并且GOROOT是/ usr / local / go时,我感到困惑的是/ src来自哪里。
为了更清楚,这里是我的GO环境(转到版本1.10)
balee@balee-VirtualBox:~/go/src/github.com/hyperledger/fabric$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/balee/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/balee/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build426169000=/tmp/go-build -gno-record-gcc-switches"
balee@balee-VirtualBox:~/go/src/github.com/hyperledger/fabric$
对此方面的任何帮助表示高度赞赏。