Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to build protobuf to go endpoint

using protobuf version 2.6.1 ( which i installed via homebrew)

I am trying to run

$ protoc --go_out=../cloud/ *.proto 

I keep receiving this error.

$ protoc-gen-go: program not found or is not executable $ --go_out: protoc-gen-go: Plugin failed with status code 1. 

I have the protoc-gen-go installed in my go path. Anyone else have this issue?

like image 813
R.J. Robinson Avatar asked Jan 22 '15 21:01

R.J. Robinson


People also ask

What is Gogo protobuf?

gogoprotobuf is a fork of golang/protobuf with extra code generation features. This code generation is used to achieve: fast marshalling and unmarshalling. more canonical Go structures. goprotobuf compatibility.

What is protoc GEN go Grpc?

This tool generates Go language bindings of service s in protobuf definition files for gRPC. For usage information, please see our quick start guide.


1 Answers

protoc-gen-go needs to be in your shell path, i.e. one of the directories listed in the PATH environment variable, which is different from the Go path. You can test this by simply typing protoc-gen-go at the command line: If it says "command not found" (or similar) then it's not in your PATH.

like image 154
Kenton Varda Avatar answered Sep 28 '22 01:09

Kenton Varda