Libprotobuf issue


Sorry to bother you. I came accros a problem about protobuf, which cost me a lot of time to solve and failed.

  • Motivation
    import other DL models (using ONNX or TF) to tvm and sgx

  • Problem
    when using ONNX, it cames:

    [libprotobuf FATAL google/protobuf/stubs/] This program requires version 3.6.1 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/”.)

    • ONNX needs python-protobuf 3.6.1 version ( I tried installing python-version-2.6.1 to keep the python version consistent with .so version , but python-version-2.6.1 didn’t work with python3 and error occurred )
    • I noticed,,, all need the, which is version 2.6.1
    • And I want to use sgx, which needs Intel’s sgxsdk and Baidu’s rust-sgxsdk.
      • and both need
      • Baidu’s sdk also needs, according to this link
  • Attempts

    • I uninstalled protobuf-2.6.1 on my machine and tried installing protobuf-3.6.1 from protobuf github repo, and same error occurred.
    • I tried the 2.6.1 and 3.6.1 version both existing on my machine, and made the protoc command version is 3.6.1, and same error occurred

I don’t konw how to solve it.


Have you tried pip show protobuf and see what is the version of it?


Thanks for your reply!
The python version is 3.6.1, and as above said, I tried installing 2.6.1, but it didn’t work with python3 and error occurred.

Name: protobuf
Version: 3.6.1
Summary: Protocol Buffers
Author: None
Author-email: None
License: 3-Clause BSD License
Location: /home/juxing/.local/lib/python3.5/site-packages
Requires: setuptools, six
Required-by: tensorflow, tensorboard, onnx


seems that you have installed in the local dir and system libprobuf is 3.6. Try to pip uninstall protobufand pip install protobuf==2.6.1 —user