How to install protocol buffer(protobuf) on TX2

I built and installed tensorflow and openCV on TX2. And ran my program written in Python.
But I got a error about protocol buffer version.
Where the error occurred is “import tensorflow.contrib.slim”.
Error code is as follows.

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.3.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 “bazel-out/local_linux-opt/genfiles/tensorflow/contrib/tensor_forest/proto/fertile_stats.pb.cc”.)
terminate called after throwing an instance of ‘google::protobuf::FatalException’
what(): This program requires version 3.3.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 “bazel-out/local_linux-opt/genfiles/tensorflow/contrib/tensor_forest/proto/fertile_stats.pb.cc”.)
Aborted (core dumped)

So I built and installed protobuf v3.4.0 (https://github.com/google/protobuf) but I can’t solve the problem. And try “apt-get install libprotobuf-dev” but it was the same.

I think that the problem is related “/usr/lib/aarch64-linux-gnu/libprotobuf.so.9” because when i install protobuf3.4, libprotobuf.so.14 is created at library folder.
so I linked libprotobuf.so.14 to libprotobuf.so.9 but in was not solved and I can’t open terminal window.

Please give me the solotion!
Jetpack version is 3.1.

Hi,

Have you checked this page?

Thanks for answer, AastaLL.
But of couse I tried that before.
I think tensorflow is not reason of problem.

Is there other solution? I sincerely hope to solve this problem.

libprotobuf’s location

/home/nvidia/bazel-0.5.2-dist/third_party/protobuf/3.2.0/cmake/libprotobuf-lite.cmake
/home/nvidia/bazel-0.5.2-dist/third_party/protobuf/3.2.0/cmake/libprotobuf.cmake
/home/nvidia/bazel-0.5.2-dist/third_party/protobuf/3.2.0/libprotobuf_java.jar
/home/nvidia/bazel-0.5.2-dist/third_party/protobuf/3.2.0/libprotobuf_java_util.jar
/home/nvidia/bazel-0.5.2-dist/third_party/protobuf/3.2.0/src/libprotobuf-lite.map
/home/nvidia/bazel-0.5.2-dist/third_party/protobuf/3.2.0/src/libprotobuf.map
/home/nvidia/libprotobuf_backup
/home/nvidia/libprotobuf_backup/libprotobuf-lite.a
/home/nvidia/libprotobuf_backup/libprotobuf-lite.so
/home/nvidia/libprotobuf_backup/libprotobuf-lite.so.9
/home/nvidia/libprotobuf_backup/libprotobuf-lite.so.9.0.1
/home/nvidia/libprotobuf_backup/libprotobuf.a
/home/nvidia/libprotobuf_backup/libprotobuf.so
/home/nvidia/libprotobuf_backup/libprotobuf.so.9
/home/nvidia/libprotobuf_backup/libprotobuf.so.9.0.1
/home/nvidia/libprotobuf_backup/libprotoc.so.9
/home/nvidia/libprotobuf_backup/libprotoc.so.9.0.1
/home/nvidia/protobuf/cmake/libprotobuf-lite.cmake
/home/nvidia/protobuf/cmake/libprotobuf.cmake
/home/nvidia/protobuf/src/.libs/libprotobuf-lite.a
/home/nvidia/protobuf/src/.libs/libprotobuf-lite.la
/home/nvidia/protobuf/src/.libs/libprotobuf-lite.lai
/home/nvidia/protobuf/src/.libs/libprotobuf-lite.so
/home/nvidia/protobuf/src/.libs/libprotobuf-lite.so.14
/home/nvidia/protobuf/src/.libs/libprotobuf-lite.so.14.0.0
/home/nvidia/protobuf/src/.libs/libprotobuf.a
/home/nvidia/protobuf/src/.libs/libprotobuf.la
/home/nvidia/protobuf/src/.libs/libprotobuf.lai
/home/nvidia/protobuf/src/.libs/libprotobuf.so
/home/nvidia/protobuf/src/.libs/libprotobuf.so.14
/home/nvidia/protobuf/src/.libs/libprotobuf.so.14.0.0
/home/nvidia/protobuf/src/libprotobuf-lite.la
/home/nvidia/protobuf/src/libprotobuf-lite.map
/home/nvidia/protobuf/src/libprotobuf.la
/home/nvidia/protobuf/src/libprotobuf.map
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.a
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.la
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so.14
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so.14.0.0
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so.9
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so.9.0.1
/usr/lib/aarch64-linux-gnu/libprotobuf.a
/usr/lib/aarch64-linux-gnu/libprotobuf.la
/usr/lib/aarch64-linux-gnu/libprotobuf.so
/usr/lib/aarch64-linux-gnu/libprotobuf.so.14
/usr/lib/aarch64-linux-gnu/libprotobuf.so.14.0.0
/usr/lib/aarch64-linux-gnu/libprotobuf.so.9
/usr/lib/aarch64-linux-gnu/libprotobuf.so.9.0.1
/usr/share/doc/libprotobuf-lite9v5
/usr/share/doc/libprotobuf-lite9v5/changelog.Debian.gz
/usr/share/doc/libprotobuf-lite9v5/copyright
/usr/share/doc/libprotobuf9v5
/usr/share/doc/libprotobuf9v5/changelog.Debian.gz
/usr/share/doc/libprotobuf9v5/copyright
/var/cache/apt/archives/libprotobuf-dev_2.6.1-1.3_arm64.deb
/var/lib/dpkg/info/libprotobuf-lite9v5:arm64.list
/var/lib/dpkg/info/libprotobuf-lite9v5:arm64.md5sums
/var/lib/dpkg/info/libprotobuf-lite9v5:arm64.shlibs
/var/lib/dpkg/info/libprotobuf-lite9v5:arm64.triggers
/var/lib/dpkg/info/libprotobuf9v5:arm64.list
/var/lib/dpkg/info/libprotobuf9v5:arm64.md5sums
/var/lib/dpkg/info/libprotobuf9v5:arm64.shlibs
/var/lib/dpkg/info/libprotobuf9v5:arm64.triggers

Hi,

Could you try to install protobuf via pip and rebuild the TensorFlow:

sudo pip install protobuf

In python, protobuf is the latest version.

nvidia@tegra-ubuntu:~/Downloads$ sudo pip install protobuf

Requirement already satisfied: protobuf in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (from protobuf)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python2.7/dist-packages (from protobuf)

And protobuf version in pip is 3.4.0.

I think it need how to install the latest protobuf c++ compiler version.
Do you have a method to install the protobuf on TX2 diffrent from normal method?

Usually, we build protoproc from source.

For example, we refer to issue-851 to build TensorFlow.

We build protobuf from source and link the application to grpc-java compiler and bazel.
You can find more information in issue-851.

Thanks.

Hi, did you manage to install a different protobuf version? I’m facing the same issue
10x

Hi asafs,

Have you checked Jetsonhacks’ tutorial?

Thanks.