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

来源:互联网 发布:怎样淘宝网购详细步骤 编辑:程序博客网 时间:2024/05/18 02:45

在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

原创粉丝点击