Caffe安装中多版本protobuf选择问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/feimengjuan/article/details/78683362

在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

猜你喜欢

转载自blog.csdn.net/feimengjuan/article/details/78683362
今日推荐