英文:
Installing GRPC in Windows
问题
我只是简单地将以下代码写入CMD中,
set PATH="$PATH:$(go env GOPATH)/bin"
不知道我是否做了明智的事情。
我只是因为使用的是Windows,所以将expose
替换为set
。
要成功完成安装,接下来应该做什么?
你能提供一下你如何安装它,就像你的电脑上的原始字符串一样,不包含任何shell变量吗?因为我对Shell还不太熟悉。
英文:
I simply write the following code to the CMD,
set PATH="$PATH:$(go env GOPATH)/bin"
and don't know whether I do something sensible or not.
I just replaced expose
with set
because of Windows.
What should be done next to complete the installation successfully?
Could you provide how you would install it as if it were your PC as a raw string without any shell variable? Because I'm not comfortable with Shell yet.
答案1
得分: 1
对于每个来到这里的人:
首先,你应该下载最新版本的协议缓冲区:
从这个链接下载并安装你想要的版本,比如:protoc-3.19.3-win64.zip
之后,将你安装的二进制路径添加到环境变量中(有关添加到环境变量的更多信息,请参见这个链接)
然后,你需要为你想要的语言安装proto编译器。在这个例子中,我选择了go
:
> $ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
> $ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
注意:GOPATH
应该在环境变量中,还有GOPATH/bin
。
英文:
For everyone who comes here:
-
first of all, you should download the latest version of the protocol buffer:
download from this link and install the version that you want, like:
protoc-3.19.3-win64.zip
after that add the binary path that you installed on the path environment. ( for more information about adding to path environment see this link)
-
after that you need to install the proto compiler for the language you want. in this example I choose
go
:
> $ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
> $ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
Note: The GOPATH
should be in environments. also GOPATH/bin
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论