--go_out: protoc-gen-go: Plugin mit Statuscode 1 fehlgeschlagen. Lösung

Beim Erstellen einer Protodatei und beim Versuch, automatisch Code zu generieren, ist ein Fehler aufgetreten.

protoc -I helloworld/ helloworld/helloworld.proto --go_out=plugins=grpc:helloworld

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
--go_out: protoc-gen-go: Plugin failed with status code 1.

Wie Sie aufgefordert werden, den Pfad festzulegen ... Die Lösung besteht darin, folgendes zu bash_profile hinzuzufügen!

export GOPATH=$HOME/go
PATH=$PATH:$GOPATH/bin

Recommended Posts

--go_out: protoc-gen-go: Plugin mit Statuscode 1 fehlgeschlagen. Lösung