Caffe安装中多版本protobuf选择问题,版本过高
在ubuntu下安装caffe时,使用make all命令后,经常会报出protobuf版本冲突的问题,如下:
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
^
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
.build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers.
#error your headers.
^
...
这个问题的出现是因为我们在安装caffe之前,安装Anaconda或tensorflow时都已经安装过libprotobuf
所以解决冲突的方法是使用以下命令:
conda uninstall libprotobuf
即可解决
详情请见https://stackoverflow.com/questions/36678292/caffe-error-with-protobuf-version