Distributed Services With Go - gogoproto on linux

I’m on Linux. Just double checked on Linux and Mac and both worked.

# I've deleted all protoc-gen-go* executables to check that it fails.
[tj@computer ServeRequestsWithgRPC]$ protoc api/v1/*.proto \
--gogo_out=Mgogoproto/gogo.proto=github.com/gogo/protobuf/proto:. \
--proto_path=$(go list -f '{{ .Dir }}' -m github.com/gogo/protobuf) \
--proto_path=.
protoc-gen-gogo: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--gogo_out: protoc-gen-gogo: Plugin failed with status code 1.
# I install the executables.
[tj@computer ServeRequestsWithgRPC]$ go get github.com/gogo/protobuf/...@v1.3.1
# Check that it can find the executable and succeeds.
[tj@computer ServeRequestsWithgRPC]$ protoc api/v1/*.proto --gogo_out=Mgogoproto/gogo.proto=github.com/gogo/protobuf/proto:. --proto_path=$(go list -f '{{ .Dir }}' -m github.com/gogo/protobuf) --proto_path=.
[tj@computer ServeRequestsWithgRPC]$ # worked

Maybe something is up with your PATH so the executables aren’t found or something.

2 Likes