prost icon indicating copy to clipboard operation
prost copied to clipboard

Custom { kind: PermissionDenied, error: "failed to invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc): (path: \"F:\\\\.protoc\\\\bin\"): 拒绝 访问。 (os error 5)" }' #44

Open yzydeveloper opened this issue 3 years ago • 14 comments

捕获

Running https://docs.rs/prost-build/latest/prost_build/ under win10 system prompts Custom { kind: PermissionDenied, error: "failed to invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc): (path: "F: \\.protoc\\bin"): Denied access. (os error 5)" }', you are already a super administrator, but you will still be prompted with an error similar to insufficient permissions

yzydeveloper avatar Mar 17 '23 16:03 yzydeveloper

It has been troubled for several days, I hope someone can help me to solve it

yzydeveloper avatar Mar 17 '23 16:03 yzydeveloper

Can you invoke protoc by itself?

LucioFranco avatar Mar 20 '23 17:03 LucioFranco

Can you invoke protoc by itself?

Yes, it is possible to call protoc directly from the command line.

yzydeveloper avatar Mar 21 '23 01:03 yzydeveloper

same error

fengbol avatar Mar 23 '23 07:03 fengbol

I am not sure then, I would need to find a way to reproduce this. One option is to start using protox as it is a pure rust implementation and wouldn't require you to have protoc available.

LucioFranco avatar Mar 27 '23 15:03 LucioFranco

same error, any solution about that?

Lichen9618 avatar May 08 '23 06:05 Lichen9618

I encountered a similiar error. I'm running with GitHub Actions.

Project: https://github.com/DiscreteTom/shremdup

I use the following command to put protoc in PATH:

wget https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip
unzip protoc-3.20.3-linux-x86_64.zip -d protoc3
mv protoc3/bin/* /usr/local/bin/

Got the following error:

Error: Custom { kind: NotFound, error: "failed to invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc): (path: \"/usr/local/bin/protoc\"): No such file or directory (os error 2)" }

DiscreteTom avatar May 26 '23 13:05 DiscreteTom

I encountered a similiar error. I'm running with GitHub Actions.

Project: https://github.com/DiscreteTom/shremdup

I use the following command to put protoc in PATH:

wget https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip
unzip protoc-3.20.3-linux-x86_64.zip -d protoc3
mv protoc3/bin/* /usr/local/bin/

Got the following error:

Error: Custom { kind: NotFound, error: "failed to invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc): (path: \"/usr/local/bin/protoc\"): No such file or directory (os error 2)" }

My issue is fixed by using a newer version of protoc: 23.2

DiscreteTom avatar May 27 '23 04:05 DiscreteTom

Hi, I have the same error on Windows 11 and WSL2 (Ubuntu 22) with protoc 23.4 and 24.2

W11 Error: Custom { kind: PermissionDenied, error: "failed to invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc): (path: \"W:\\\\protoc\\\\bin\"): Access is denied. (os error 5)" }

WSL2 Error: Custom { kind: PermissionDenied, error: "failed to invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc): (path: \"/root/protoc/bin\"): Permission denied (os error 13)" }

IrwinJuice avatar Aug 31 '23 18:08 IrwinJuice

Any progress here? Was anyone able to handle this error? I am facing this on windows with protoc 24.2

kishansagathiya avatar Oct 06 '23 11:10 kishansagathiya

The environment variable must point to the exe file

catnuko avatar Nov 02 '23 08:11 catnuko