Protocol protocol error

I am trying to install the Caffe library, but I have a compilation problem due to the wrong protobuf version installed on my system.

In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^
.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.

I followed many of the suggested approaches on the forum, and I think that this post discussed the most similar problem.

In caffe.pb.h control:

#if 3002000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please
#error regenerate this file with a newer version of protoc.
#endif

However, in my system header (/usr/include/google/protobuf/stubs/common.h):

The current version, represented as a single integer to make comparison
easier:  major * 10^6 + minor * 10^3 + micro
define GOOGLE_PROTOBUF_VERSION 2005000

From the terminal, the protoc -version command returns libprotoc 3.2.0 .

So, I installed version 3.2, but the system headers are not updated. One user in a previous post commented: “I figured out the way by specifying protobuf, which I want first in the PATH variable, without having to remove another version of protobuf (other things depended on this old version).

- , ? ? , libprotoc, .

+4
1

, , . Ubuntu16.04, Anaconda ( python2.7), Caffe. , conda libprotobuf-dev, sudo apt-get install libprotobuf-dev, "apt-get" conda, , 'locate protobuf', libprotobuf Anaconda, .

conda uninstall libprotobuf
conda uninstall protobuf

tensorflow Caffe, - libprotobuf.

0

Source: https://habr.com/ru/post/1681251/


All Articles