n@rjn-Oryx-Pro:~$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tensorflow
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.4.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_archive/src/google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.4.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_archive/src/google/protobuf/any.pb.cc".)
Aborted (core dumped)
NOTE:
rjn@rjn-Oryx-Pro:~$ pip2 show protobuf
Name: protobuf
Version: 3.5.2.post1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: [email protected]
Author-email: [email protected]
License: 3-Clause BSD License
Location: /usr/local/lib/python2.7/dist-packages
Requires: setuptools, six
Required-by: tensorflow, tensorflow-tensorboard, tensorflow-gpu
NOTE:
sudo find .. / -name libprotobuf*
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9.0.1
/usr/lib/paraview/libprotobuf.so
NOTE:
I have followed all directions on installing protobuf manually from protobuf web site. Copying into /usr/local as directed but this does not resolve issue.
I also tried compiling from source but make check fails with same error.
make check
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.5.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 "google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.5.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 "google/protobuf/any.pb.cc".)
I tried uninstalling tensorflow and protobuf every where using pip and apt-get and the reinstalling but still same error.
I have not seen this error before and it seems a lot of people are now getting it but none of the solutions seem to work.
Scanning for protobuf in my system show it in: I do not want to delete it as I fear breaking ubuntu. My version is Ubuntu 16.04
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9.0.1
/usr/lib/paraview/libprotobuf.so
I just had the same issue:
It turned out,
LD_PRELOAD
contained/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
which confused python. After removing it in my.bashrc
, the problem was resolved.