Unable to build protobuf to go endpoint

R.J. Robinson picture R.J. Robinson · Jan 22, 2015 · Viewed 48k times · Source

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?

Answer

Kenton Varda picture Kenton Varda · May 7, 2015

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.