报错格式一般如下:

../../../internal/github.com/hyperledger/fabric/protoutil/signeddata.go:16:2: cannot find package "github.com/gogo/protobuf/proto" in any of:
/usr/local/go/src/github.com/gogo/protobuf/proto (from $GOROOT)
/opt/gopath/src/github.com/gogo/protobuf/proto (from $GOPATH)
/opt/gopath/src/google.golang.org/grpc/status/status.go:37:2: cannot find package "google.golang.org/genproto/googleapis/rpc/status" in any of:
/usr/local/go/src/google.golang.org/genproto/googleapis/rpc/status (from $GOROOT)
/opt/gopath/src/google.golang.org/genproto/googleapis/rpc/status (from $GOPATH)

简单shell脚本拉取:

grep -i "cannot find package" [错误信息文件名] | awk '{print $5}' | sed 's/\"/go get /' | sed 's/\"//' | sh

相关文章:

  • 2022-01-01
  • 2021-06-25
  • 2021-12-19
  • 2022-02-08
  • 2022-02-20
  • 2022-03-04
  • 2021-11-21
猜你喜欢
  • 2021-11-28
  • 2021-12-24
  • 2022-12-23
  • 2021-08-04
  • 2022-02-04
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案