无法构建protobuf进行端点处理 [英] Unable to build protobuf to go endpoint

查看:46
本文介绍了无法构建protobuf进行端点处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用protobuf版本2.6.1(我通过自制软件安装)

using protobuf version 2.6.1 ( which i installed via homebrew)

我正在尝试运行

$ protoc --go_out=../cloud/ *.proto

我一直收到此错误.

$ protoc-gen-go: program not found or is not executable
$ --go_out: protoc-gen-go: Plugin failed with status code 1.

我的go路径中安装了protoc-gen-go.其他人有这个问题吗?

I have the protoc-gen-go installed in my go path. Anyone else have this issue?

推荐答案

protoc-gen-go 必须位于您的 shell 路径中,即列出的目录之一在 PATH 环境变量中,该变量与Go路径不同.您可以通过在命令行中键入 protoc-gen-go 来进行测试:如果显示找不到命令"(或类似命令),则它不在您的 PATH 中.

protoc-gen-go needs to be in your shell path, i.e. one of the directories listed in the PATH environment variable, which is different from the Go path. You can test this by simply typing protoc-gen-go at the command line: If it says "command not found" (or similar) then it's not in your PATH.

这篇关于无法构建protobuf进行端点处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆