This file was generated by an older version of protoc 解决方法
在编译与gazebo相关的包时常常会出现protoc版本冲突问题,从而导致编译失败,如下图:
In file included from /usr/include/gazebo7/gazebo/msgs/MessageTypes.hh:91:0,from /usr/include/gazebo7/gazebo/msgs/msgs.hh:24,from /usr/include/gazebo7/gazebo/physics/Entity.hh:28,from /usr/include/gazebo7/gazebo/physics/Model.hh:32,from /home/thesis/gazebo_animate_pose/animate_pose.cc:4:
/usr/include/gazebo7/gazebo/msgs/wrench_stamped.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
/usr/include/gazebo7/gazebo/msgs/wrench_stamped.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
/usr/include/gazebo7/gazebo/msgs/wrench_stamped.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
遇到此类问题的其中一个原因是,当前的protoc版本较高。
命令 protoc --version 可以查看当前protoc版本 。
我当前使用的是ubuntu 16.04,ros kinetic ,Gazebo版本为7.0。protoc需要确保版本为2.6.1,而我当前的为3.4.0,因此需要将系统中的protoc替换为2.6.1版本。
具体操作为:
1.$ cd /usr/local/include/google;
2.sudo rm -rf protobuf;
3.下载protobuf-2.6.1,here;(我下载了protobuf-2.6.1.zip)
4.$ ./autogen.sh;
5.$ ./configure;
6.$ make;
7.$ make check;
8.$ sudo make install;
9.$ sudo ldconfig;
至此可以继续编译相应工作区。
This file was generated by an older version of protoc 解决方法相关推荐
- Mac OS build caffe2 Error:This file was generated by an older version of protoc which is
问题所在 我们可以发现这个错误跟protobuf的版本有关,因此我们可以执行script/diagnose_protobuf.py 我们可以看到,pip install protobuf 和 brew ...
- libtool: Version mismatch error. 解决方法
在编译一个软件的时候,在 ./configure 和 make 之后可能会出现如下错误: [plain] view plaincopyprint? libtool: Version mismatch ...
- 关于 麒麟系统启动应用报错“undefined symbol: __cxa_throw_bad_array_new_length, version Qt_5“ 的解决方法
若该文为原创文章,转载请注明原文出处 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/125516818 红胖子(红模仿)的博文大全:开发技术集 ...
- android开发中出现R.java was modified manually! Reverting to generated version!问题的解决方法...
这种问题是说R.java文件没有起作用,开发中R.java文件是很重要的,所以解决此类问题按照下面的方法即可: 进入 eclipse后选择菜单栏中的 Projects ,然后选择 clean 这样就把 ...
- MyEclipse导入项目后报Unknown Faceted Project Problem (Java Version Mismatch)的解决方法
把down下来的导入到eclipse/MyEclipse的时候,经常会遇到Description Resource Path Location Type Java compiler level doe ...
- File xxx specified for property 'resourceFile' does not exist.解决方法
今天刚更新了Android Studio 2.2,重新编译项目时就出现了以下问题: Error:A problem was found with the configuration of task ' ...
- File类的学习过程中出现的问题及解决方法
1. 利用File构造器,new 一个文件目录file 1)在其中创建多个文件和目录,测试自己学过的File类的方法 2)手动编写方法,实现删除file中指定文件的操作 2. 判断指定目录下是否有 ...
- file:///f:winwwwxml2.php,php simplexml_load_file 中文乱码的解决方法
中文乱码多半是编码导致的我们只要调整一下输出编码即可解决中文乱码问题,下面我们看simplexml_load_file中文乱码解决办法. 在PHP5.0 中,simplexml_load_file() ...
- jsp通过<%@include file=“bottom.txt“ %>指令引入txt乱码的解决方法
1.错误案例: jsp: txt: 运行结果 2.解决方案 在txt中加上pageEncoding="gbk"
最新文章
- js学习笔记1---使用方法
- 清空SQL Server日志
- 神了!用命令行管理你的 GitHub 项目,不必再开网页!
- [svc]visio绘制模具
- mysql 有ntext_深入char、varchar、text和nchar、nvarchar、ntext的区别详解
- http://hudeyong926.iteye.com/blog/977152
- element 项目 示例_Java ArrayDeque element()方法与示例
- 迷宫(信息学奥赛一本通-T1215)
- 【Swift】iOS裁剪或者压缩后出现的白边问题
- 【网络学习笔记】Excel数据分析实战项目—淘宝用户画像
- Vue源码学习之Vue对于闭包的使用
- 偶滴神嘞~终于弹钢琴了
- cad卸载_永远不舍得卸载的6款CAD插件,完全免费,让你三小时做一套图!
- 实现计算机系统的资源共享,实现多操作系统计算机的资源共享.pdf
- Keil工程窗口各项图标描述
- android切换夜间模式吗,Android切换夜间模式
- 屏幕小虫子_这些是导致疯狂的小虫子
- idea 如何导入和导出自己设置好的主题背景
- 【深度学习】什么是解耦?
- python 椭圆曲线_椭圆曲线double和add在python中的实现