How can I fix this configure error?

3

1

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?

dromodel

Posted 2013-11-07T20:47:11.147

Reputation: 287

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 – 2013-11-07T20:56:16.677

Have you looked at config.log yet? – Ignacio Vazquez-Abrams – 2013-11-07T21:03:27.267

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 – 2013-11-08T20:31:51.683

Answers

6

To fix this, run it like this:

export PREFIX=~/usr   
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig; 
./configure --prefix=${PREFIX}

Max

Posted 2013-11-07T20:47:11.147

Reputation: 181

2I needed to remove the semicolon – FDinoff – 2014-09-01T15:32:15.477

0

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

https://github.com/google/protobuf

dsaju

Posted 2013-11-07T20:47:11.147

Reputation: 11

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 – 2016-12-20T19:42:37.760

@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 – 2019-08-21T06:20:35.697

@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 – 2019-08-21T06:49:13.393

@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 – 2019-08-22T11:41:41.623