Skip to content

Getting 'protoc not found' error #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vvviiimmm opened this issue Feb 12, 2016 · 4 comments
Closed

Getting 'protoc not found' error #83

vvviiimmm opened this issue Feb 12, 2016 · 4 comments

Comments

@vvviiimmm
Copy link

Hello,

Trying to use the plugin but getting this error message saying protoc couldn't be found.

[error] (protobuf:protobufGenerate) error occured while compiling protobuf files: Cannot run program "protoc": error=2, No such file or directory

I do have protoc installed in my path:

➜ ~ which protoc
/usr/local/bin/protoc
➜ ~ protoc --version
libprotoc 2.6.1

Not sure if thats an issue, but I did everything from installation guide. Any help would be greatly appreciated.

@thesamet
Copy link
Contributor

Sounds like a PATH issue, try setting the path to protoc explicitly in SBT:
PB.protoc in PB.protobufConfig := "/usr/local/bin/protoc"

Alternatively, you can use protoc-jar as explained in "Running without Protoc" at https://trueaccord.github.io/ScalaPB/sbt-settings.html

@vvviiimmm
Copy link
Author

Thanks a lot, setting the path explicitly helped.

@samuelpraveen
Copy link

Hi,

Obserning the below error even after installing protobuf 3.1.0
root@ubuntu:/usr/local/bin# protoc --version
-bash: /usr/bin/protoc: No such file or directory

Could you please help?

@thesamet
Copy link
Contributor

Hi @samuelpraveen ,

  1. It looks like you have problem installing protoc, so it makes sense to ask it at the protobuf mailing list, not ScalaPB. However, if you just did make install and using bash try running rehash and sudo ldconfig if needed.
  2. If you are using ScalaPB through sbt-protoc, you don't have to install protoc. Out of the box protoc is provided to you as a dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants