编译pycaffe错误 --#error This file was generated by a newer version of protoc
2017-07-03 17:39
591 查看
在编译py-faster-rcnn的pycaffe时出现以上错误:
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/blob.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/net.cpp
CXX src/caffe/solver.cpp
CXX src/caffe/util/insert_splits.cpp
CXX src/caffe/util/db.cpp
CXX src/caffe/util/upgrade_proto.cpp
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.
^
.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),之后重新编译就好了
卸载办法:
如果出现错误:
E:Encountered a section with no Package: header,
输入以下命令:
重新安装
附注:
查看当前protoc版本:protoc --version
查看protoc安装位置:which protoc
查找protoc相关文件:sudo find / -name protoc
手动安装protobuf 2.6.1方法:
http://www.cnblogs.com/javaee6/p/4849051.html
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/blob.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/net.cpp
CXX src/caffe/solver.cpp
CXX src/caffe/util/insert_splits.cpp
CXX src/caffe/util/db.cpp
CXX src/caffe/util/upgrade_proto.cpp
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.
^
.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),之后重新编译就好了
卸载办法:
#remove sudo apt-get remove libprotobuf-dev protobuf-compiler sudo apt-get remove libprotobuf-lite8 libprotoc8 sudo apt-get remove python-protobuf sudo pip uninstall protobuf #如果安装了anaconda conda uninstall protobuf
如果出现错误:
E:Encountered a section with no Package: header,
输入以下命令:
sudo rm /var/lib/apt/lists/* -vf sudo apt-get update
重新安装
#reinstall sudo apt-get install libprotobuf-dev protobuf-compiler #if anaconda conda 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
相关文章推荐
- error This file was generated by a newer version of protoc
- Mac OS build caffe2 Error:This file was generated by an older version of protoc which is
- caffe.pb.h This file was generated by a newer version of protoc
- 解决方案: the selected file is a solution file but was created by a newer version of this application an
- 解决方案: the selected file is a solution file but was created by a newer version of this application and cannot be opened
- 解决方案: the selected file is a solution file but was created by a newer version of this application an
- gdal错误:ERROR 4: This is a BigTIFF file. BigTIFF is not supported by this version of
- Invalid configuation file. File "**********" was created by a VMware product with more feature than this version of VMware Workstation and cannot be
- .NET Web Deployment Project 编译错误An error occurred when merging assemblies: Index was outside the bounds of the array解决办法
- 编译arm内核出现error Your version of gcc miscompiles the __weak directive 错误
- 'FILE' : illegal use of this type as an expression编译错误的解决
- svn报错:This error was generated by a custom hook script on the Subversion server.
- 编译错误:A class file was not written. The project may be inconsistent, if so try refreshing this projec
- Java 编译,运行错误之 java.lang.UnsupportedClassVersionError: Bad version n umber in .class file
- 编译错误This version of Android Studio is incompatible with the Gradle Plugin used
- 'FILE' : illegal use of this type as an expression编译错误的解决
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译出现错误: XXX was compiled with a different version of XXX
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- VMware:Configuration file was created by a VMware product with more features than this version