编译pycaffe错误 --#error This file was generated by a newer version of protoc
来源:互联网 发布:天下三捏脸数据女bx 编辑:程序博客网 时间:2024/06/05 03:25
在编译py-faster-rcnn的pycaffe时出现以上错误:
CXX .build_release/src/caffe/proto/caffe.pb.ccCXX src/caffe/blob.cppCXX src/caffe/data_transformer.cppCXX src/caffe/net.cppCXX src/caffe/solver.cppCXX src/caffe/util/insert_splits.cppCXX src/caffe/util/db.cppCXX src/caffe/util/upgrade_proto.cppIn 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. ^.build_release/src/caffe/proto/caffe.pb.h:22:35: fatal error: google/protobuf/arena.h: 没有那个文件或目录 #include <google/protobuf/arena.h> ^compilation terminated.
原因: it is because of the wrong version of protobuf
首先你要卸载,并重装其要求的protobuf版本(2.6.1),之后重新编译就好了
卸载办法:
#removesudo apt-get remove libprotobuf-dev protobuf-compilersudo apt-get remove libprotobuf-lite8 libprotoc8sudo apt-get remove python-protobufsudo pip uninstall protobuf#如果安装了anacondaconda uninstall protobuf
如果出现错误:
E:Encountered a section with no Package: header,
输入以下命令:
sudo rm /var/lib/apt/lists/* -vfsudo apt-get update
#reinstallsudo apt-get install libprotobuf-dev protobuf-compiler#if anacondaconda install -c anaconda protobuf=2.6.1或者/home/username/anaconda2/bin/pip install protobuf == 2.6.1
附注:
查看当前protoc版本:protoc --version
查看protoc安装位置:which protoc
查找protoc相关文件:sudo find / -name protoc
手动安装protobuf 2.6.1方法:
http://www.cnblogs.com/javaee6/p/4849051.html
阅读全文
2 0
- 编译pycaffe错误 --#error This file was generated by a newer version of protoc
- error This file was generated by a newer version of protoc
- caffe.pb.h This file was generated by a newer version of protoc
- proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc
- 解决方案: the selected file is a solution file but was created by a newer version of this application an
- 升级XCode8编译报错:“Module file was created by an older version of the compiler”
- fatal error C1189: #error : "This file was generated using the moc from 4.4.3. It
- fatal error C1189: #error : "This file was generated using the moc from 4.4.3. It
- this error was generated by TI's USCIF driver解决办法汇总
- SEED-XDS510仿真器报错:this error was generated by TI's USCIF driver解决办法汇总
- 解决MySQL导入文件问题(The selected file was generated by mysqldump and cannot be restored by this applicati)
- 编译出现错误: XXX was compiled with a different version of XXX
- object file (xx.a(xx.o)) was built for newer iOS version (10.3) than being linked (10.2)
- 编译错误:A class file was not written. The project may be inconsistent, if so try refreshing this projec
- How to Take Ownership of a File/Folder Using Command-Line in Windows 7 or newer version System
- matlab(This error was detected while a MEX-file was running)
- nifi Error(ExecuteScript): is not the most recent version of this flow file within this session
- "A more recent version of this document is supported by this" JPA persistence.xml问题
- ionic问题总结
- css3变形属性transform
- 基于struts2开发的登录模块(Mysql数据库)
- Hive几个小技巧
- DecimalFormat用法2
- 编译pycaffe错误 --#error This file was generated by a newer version of protoc
- Linux SPI总线和设备驱动架构之一:系统概述
- 使用tolua++实现C++与LUA相互调用
- Fiddler抓取主流新闻客户端搜索url
- 代理
- centos ruby环境安装(redis集群搭建 )
- Android recovery支持adb shell
- javaweb项目在tomcat中去掉端口去掉项目名访问
- webView 加载图片