简体   繁体   中英

“cannot find package” during make install using Go?

I am getting this error while running a GitHub hyperledger blockchain project

go build -o sample/build/keytool ./sample/authentication/keytool
sample/authentication/keytool/main.go:19:8: cannot find package "github.com/hyperledger-labs/minbft/sample/authentication/keytool/cmd" in any of:
    /usr/lib/go-1.10/src/github.com/hyperledger-labs/minbft/sample/authentication/keytool/cmd (from $GOROOT)
    /home/shalikram/go/src/github.com/hyperledger-labs/minbft/sample/authentication/keytool/cmd (from $GOPATH)
Makefile:55: recipe for target 'build' failed
make: *** [build] Error 1

the simplest way to solve this issue would be to simply install the package via go get since you are running go 1.10; in your case it looks like it would be

$> go get github.com/hyperledger-labs/minbft

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM