gpt4 book ai didi

go - Win10,戈兰。协议(protocol)-I。 --go_out=plugins=grpc : . proto/hello/hello.proto .: 权限被拒绝

转载 作者:IT王子 更新时间:2023-10-29 02:10:08 26 4
gpt4 key购买 nike

软件环境:Win10,Goland。
去版本:go1.9.1 windows/amd64.协议(protocol)——版本:libprotoc 3.5.1当我执行命令时。结果如下

protoc -I . --go_out=plugins=grpc: . proto/hello/hello.proto 
.: Permission denied

我尝试以管理员身份运行。我可以完全控制所有文件。现在我该怎么做。

最佳答案

我遇到了同样的问题。

我发现错误消息具有误导性。

这是对我有用的:

改变这个:

protoc -I . --go_out=plugins=grpc: . proto/hello/hello.proto 

为此:

protoc ./proto/hello/hello.proto --go_out=plugins=grpc:./outputDirectory -I ./proto/hello/hello.proto

部分命令显然看起来多余,但这是我必须做的才能使其正常工作。我建议尝试这个,看看它是否运行。如果确实如此,那么您可以查看是否能够对其进行调整,但我不这么认为。

你绝对不应该将“proto/hello/hello.proto”作为输出,因为那实际上是你的输入文件。如果 ”。”是你的输出,然后这样做:

protoc ./proto/hello/hello.proto --go_out=plugins=grpc:. -I ./proto/hello/hello.proto

请注意,您不需要该空间。

关于go - Win10,戈兰。协议(protocol)-I。 --go_out=plugins=grpc : . proto/hello/hello.proto .: 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49185424/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com