5

I'm testing tensorflow, which is based on protobuf 3.0.0-b3/30.0-b2. But current Ubuntu 16.04 repository comes with protobuf 2.6.1 ... So when I tested my tensorflow code, I run into this error message:

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.0.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  This program requires version 3.0.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "external/protobuf/src/google/protobuf/any.pb.cc".)
Aborted (core dumped)

I wonder how to solve this protobuf version conflict issues.

3

Unfortunately, protobuf3 cannot be acquired through apt-get until Ubuntu 16.10 (Yakkety Yak). So you'll either need to update to that version of Ubuntu first, or get the library from its git repository.

Following the instructions at https://github.com/google/protobuf/blob/master/src/README.md, either install a prebuilt from here https://github.com/google/protobuf/releases or build it yourself from the sources (if you may want to join in the development effort for the library itself).

2

I am not sure if that is what you are looking for. I found a very simple way to upgrade protobuf from 2.6.1 to 3.5.2.post1 for python 2.7

sudo pip install --upgrade protobuf

as in:

Installing Google Protobuf on Ubuntu 15.10

1

Since bionic beaver protobuf version 3 is directly available via apt.

https://launchpad.net/ubuntu/+source/protobuf

$ sudo apt install protobuf-compiler
...
$ protoc --version
libprotoc 3.0.0

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.