3

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?

3
  • 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, 2013 at 20:56
  • Have you looked at config.log yet? Nov 7, 2013 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, 2013 at 20:31

3 Answers 3

6

To fix this, run it like this:

export PREFIX=~/usr   
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig; 
./configure --prefix=${PREFIX}
1
  • 3
    I needed to remove the semicolon
    – FDinoff
    Sep 1, 2014 at 15:32
0

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

https://github.com/google/protobuf

4
  • 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. Dec 20, 2016 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, 2019 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. Aug 21, 2019 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, 2019 at 11:41
0

If anyone else gets stuck on this, I found a solution here: https://narkive.com/kRRnccDo.2

As part of installing protobuf, it should have installed a file called protobuf.pc, probably in /usr/local/lib/pkgconfig/protobuf.pc. Assuming that's where it is, try:

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure

I initially tried just installing the binary from the protobuf github, but that didn't include the protobuf.pc file. I ended up having to build protobuf from source and then executing PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure

This is similar, but not quite the same as Roney's solution above

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .