error This file was generated by a newer version of protoc

12 篇文章 0 订阅
CXX .build_release/src/caffe/proto/caffe.pb.cc
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.
^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:26:55: fatal error: google/protobuf/generated_enum_reflection.h: No such file or directory
#include <google/protobuf/generated_enum_reflection.h>

compilation terminated.
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1


解决方案


I solved this on my computer and maybe it can help you. My environment is Ubuntu16.04, and I installed Anaconda(for python2.7) before I install Caffe. It happens that I used conda to install libprotobuf-dev, and this leads to conflict with the caffe's 'sudo apt-get install libprotobuf-dev' command, for 'apt-get' and conda installed different on my computer which can be find by 'locate protobuf', so I remove the Anaconda's version of libprotobuf, and no problem happens again.

conda uninstall libprotobuf

When you install tensorflow before install Caffe, this problem will also happen, because of the libprotobuf conflict.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值