protoc-gen-gogo编译器在Go语言中出现问题。

huangapple go评论79阅读模式
英文:

Protoc-gen-gogo compiler issue with go

问题

步骤1:添加以下依赖项

github.com/gogo/protobuf/proto [ok]
github.com/gogo/protobuf/protoc-gen-gogo [ok]
github.com/gogo/protobuf/gogoproto [ok]
google.golang.org/grpc [ok]

步骤2:在项目中创建proto文件
步骤3:更改目录并输入以下命令

protoc --gogo_out=. greet

错误:
protoc-gen-gogo: 找不到程序或不可执行
请使用绝对路径指定程序,或确保该程序在您的PATH系统变量中可用。
--gogo_out: protoc-gen-gogo: 插件返回状态码1。

请帮助我。

英文:
Step 1:- add following dependencies 

> github.com/gogo/protobuf/proto [ok]
> github.com/gogo/protobuf/protoc-gen-gogo[ok]
> github.com/gogo/protobuf/gogoproto[ok]
> google.golang.org/grpc[ok]

Step 2:- 
  create proto file in a project 
Step 3:-
  change directory and type this command 

> protoc --gogo_out=. greet

error:=
protoc-gen-gogo: program not found or is not executable
Please specify a program using the 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.

PLease help me

答案1

得分: 1

看起来你的系统上没有安装protoc-gen-gogo。使用go get github.com/gogo/protobuf/protoc-gen-gogo进行安装,然后再试一次。
如果需要更多帮助,请参考这个链接:https://github.com/gogo/protobuf

英文:

It seems you did not install protoc-gen-gogo on your system.
Install it using go get github.com/gogo/protobuf/protoc-gen-gogo and try again.
For more help refer to this - https://github.com/gogo/protobuf

huangapple
  • 本文由 发表于 2021年6月6日 17:16:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/67857531.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定