Why is GitHub Actions not recognizing protoc even after installation?

0
6
Asked By CuriousCat99 On

I'm trying to get my Rust project built using GitHub Actions, and I need the Protobuf compiler (protoc) to be available. I set up my workflow file intending to install protoc like this: I have the action running on ubuntu-latest, and included a step to update and install protobuf-compiler. After that, I added a line to check the installation with 'which protoc', which correctly returns /usr/bin/protoc. Furthermore, I've set the PROTOC environment variable to that path in the workflow. However, the build fails with an error saying it couldn't find 'protoc', even though I double-checked that it's installed. I'm at a loss about what might be going wrong here.

1 Answer

Answered By SmartDev123 On

Have you tried adding the path to your runner's tools environment? Sometimes explicitly setting it up in the shell profile can help too. You could also try using a full path call for protoc just to be safe.

CuriousCat99 -

If 'which protoc' shows it's in /usr/bin/protoc and I've set PROTOC to that path and even did an export for good measure, how can it possibly not be found? Also, what do you mean by 'shell profile' in the context of a GitHub Action? I'm unfamiliar with that. And what do you mean by 'explicit call'? Thanks for your help!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.