When I try to generate a proto file using my Makefile command -
protoc --proto_path=proto proto/*.proto --go_out=gen/
, I get this error -
protoc-gen-go: 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
When I run which go
, I have this:
/usr/local/go/bin/go
which protoc
returns this -
/usr/local/bin/protoc
Here is how my .zshrc
looks like:
export PATH="$PATH:/usr/local/mongodb/bin"
export GOROOT=/usr/local/go
I have also installed the plugins
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
Please else should I add my .zshrc
to avoid this error?