gRPC-Go has a dependency on the old and new protobuf packages. See our 
go.mod file here: https://github.com/grpc/grpc-go/blob/master/go.mod

When you try running/compiling your example code for the first time, you 
should see both these dependencies being pulled down:
easwars@grpc-go:~/grpc-go/examples/helloworld$ go run greeter_server/main.go
go: downloading github.com/golang/protobuf v1.4.2
go: downloading google.golang.org/protobuf v1.25.0
go: downloading google.golang.org/genproto 
v0.0.0-20200806141610-86f49bd18e98
go: downloading golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: downloading golang.org/x/text v0.3.0
2021/02/11 03:49:57 Received: world

Please try going through the quickstart to see if you missed anything.

Thanks

On Wednesday, February 10, 2021 at 5:21:43 PM UTC+5:30 [email protected] 
wrote:

> New to protobuf and grpc, was trying the grpc Quick start tutorial.
> I installed latest Go (1.15.8) and protobuf (v 3.14.0).
>
> Then I installed protobuf compiler via:
> go get google.golang.org/protobuf/cmd/protoc-gen-go \ 
> google.golang.org/grpc/cmd/protoc-gen-go-grpc
>
> I am able to compile my test.proto to get test.pb.go and test_grpc.pb.go 
> via:
> protoc --go_out=. --go-grpc_out=. test.proto
>
> But compiling my sample code I get errors i.e.
> go\src\google.golang.org\grpc\credentials\credentials.go:31:2: cannot 
> find package "github.com/golang/protobuf/proto" in any of: GOROOT or 
> GOPATH
>
> grpc is trying to import "github.com/golang/protobuf/proto" which doesnt 
> exist, it should be pointing to google.golang.org/protobuf/proto
>
> Any idea how to get grpc to point to protobuf v2? Or I need to switch to 
> protobuf v1 (github.com/golang/protobuf) to work with grpc?
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/22aa8ee9-dcdd-4711-bc84-e41af35ddcddn%40googlegroups.com.

Reply via email to