简体   繁体   English

--go_out:protoc-gen-go:系统找不到Windows 10指定的文件

[英]--go_out: protoc-gen-go: The system cannot find the file specified Windows 10

I am trying to use this command protoc greet\\greetpb\\greet.proto --go_out=plugins=grpc: . 我正在尝试使用此命令protoc greet\\greetpb\\greet.proto --go_out=plugins=grpc: I got that message 我知道了

"--go_out: protoc-gen-go: The system cannot find the file specified." “ --go_out:protoc-gen-go:系统找不到指定的文件。

My protoc version is libprotoc 3.6.1 My go version go version go1.11.2 windows/386 Also into my package list is this github.com/golang/protobuf/protoc-gen-go/grpc 我的协议版本是libprotoc 3.6.1我的go版本go版本go1.11.2 windows / 386我的软件包列表中也有这个github.com/golang/protobuf/protoc-gen-go/grpc

I am new using golang and I trying to learn grpc. 我是使用golang的新手,并且尝试学习grpc。 Could someone helps me with that problem? 有人可以帮我解决这个问题吗? I am using windows 10. 我正在使用Windows 10。

I could solve that problem editing the environment variable PATH. 我可以解决编辑环境变量PATH的问题。 I add %GOPATH%/bin and the command works. 我添加%GOPATH%/ bin,该命令有效。

Make sure you have protobuf installed 确保已安装protobuf

brew install protobuf
go get -u github.com/golang/protobuf/protoc-gen-go

this should install protoc-gen-go into your $GOPATH/bin 这应该将protoc-gen-go安装到您的$ GOPATH / bin中

set your PATH environment variable to the above folder 将您的PATH环境变量设置为上述文件夹

PATH = :$GOPATH/bin:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM