I'm trying to build mosh from source on a SUSE10 machine and am getting the following error:

checking for protobuf... no
configure: error: Package requirements (protobuf) were not met:

No package 'protobuf' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables protobuf_CFLAGS
and protobuf_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I downloaded the source to protobuf and installed it in a custom path as well. I'm not using a package manager for any of this and cannot for various reasons outside the scope of the question. I added that custom path to my PATH and rehashed. Typically, this is enough for configure but in this case its not doing the trick. I added the prefix for protobuf to PKG_CONFIG_PATH but am still hitting this error.

What should I do next to get past this error?

  • Your PATH should not be relevant here. Does the configure script have a --lib-prefix option? How did you add the path to PKG_CONFIG_PATH? – terdon Nov 7 '13 at 20:56
  • Have you looked at config.log yet? – Ignacio Vazquez-Abrams Nov 7 '13 at 21:03
  • Didn't look at config.log but have now. There was a suggestion buried in there that helped. Needed to point it to lib/pkgconfig. Never know how to read those log files and still don't but got enough out of it. Thanks! – dromodel Nov 8 '13 at 20:31

To fix this, run it like this:

export PREFIX=~/usr   
./configure --prefix=${PREFIX}
  • 3
    I needed to remove the semicolon – FDinoff Sep 1 '14 at 15:32

You may need to install protobuf. Everything works fine after that .


  • Welcome to Super User. The OP wrote "I downloaded the source to protobuf and installed it in a custom path as well". Your answer brings nothing new. – Kamil Maciorowski Dec 20 '16 at 19:42
  • @KamilMaciorowski People who are looking for answers skim the question. They may be confused by the name of two different packages: protobuf and protobuf-c. This answer will help. – Han Aug 21 '19 at 6:20
  • @Han The question doesn't mention protobuf-c. Even the answer doesn't mention it, so I really do not understand your comment. I still think the answer advises what has already been done. If not, it should explain the difference: what went wrong in the first try and why the laconic (if not trivial) "install protobuf" should help in the next try. The link is a generic link to protobuf on GitHub, so it doesn't shed any light either. – Kamil Maciorowski Aug 21 '19 at 6:49
  • @KamilMaciorowski I faced same issue (actually same error text), google led me here and this answer helped. This error showed when I tried installing protobuf-c. I was so confused why there was such problem like that till I realized that they are 2 different packages. I upvoted the answer. – Han Aug 22 '19 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.