英文:
Failure: plugin grpc-gateway: could not find protoc plugin for name grpc-gateway -
问题
在使用"buf generate"生成Prot buff时,我遇到以下错误:
失败:插件grpc-gateway:找不到名为grpc-gateway的protoc插件 - 请确保protoc-gen-grpc-gateway已安装并在您的$PATH中存在
我尝试了以下安装命令:
"go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest;"
英文:
while genrating Prot buff using "buf generate"
i am getting below error :
Failure: plugin grpc-gateway: could not find protoc plugin for name grpc-gateway - please make sure protoc-gen-grpc-gateway is installed and present on your $PATH
i have tried installtion of
"go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest; "
答案1
得分: 2
以下是要翻译的内容:
$ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
然后检查你的路径,如果没有设置,请使用以下命令:
PATH="${PATH}:${HOME}/go/bin"
英文:
$ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
then check for your path , if its not set then use below command :
PATH="${PATH}:${HOME}/go/bin"
答案2
得分: 0
错误是针对protoc-genc-grpc-gateway
的,它与proto-gen-go-grpc
不同。
请参考安装说明,其中包括protoc-gen-grpc-gateway
。
你还需要确保插件在你的主机的PATH
中。在Linux上,你可以在安装后使用which protoc-gen-grpc-gateway
来确认这一点。
英文:
The error is specifically for protoc-genc-grpc-gateway
which is distinct from proto-gen-go-grpc
.
See the Installation instructions that include protoc-gen-grpc-gateway
.
You will also need that the plugin is in your host's PATH
. On Linux you can which protoc-gen-grpc-gateway
to confirm this after installation.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论