RoboRTS的安装
2018-06-22 本文已影响1人
松山剑客
-
google protobuf
版本问题:
/home/hitcsc/workspace/RoboRTS/modules/driver/camera/proto/camera_param.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
^
/home/hitcsc/workspace/RoboRTS/modules/driver/camera/proto/camera_param.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
/home/hitcsc/workspace/RoboRTS/modules/driver/camera/proto/camera_param.pb.h:14:2: error: #error your headers.
#error your headers.
^
In file included from /home/hitcsc/workspace/RoboRTS/modules/driver/camera/proto/camera_param.pb.cc:5:0:
/home/hitcsc/workspace/RoboRTS/modules/driver/camera/proto/camera_param.pb.h:23:35: fatal error: google/protobuf/arena.h: No such file or directory
compilation terminated.
错误包括两个:1). This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer headers. Please update your headers. 2). google/protobuf/arena.h: No such file or directory
按照网上博客的说法,产生错误的原因是使用的protoc
软件版本不对,是用conda
安装对应版本的protoc
就可以了,(但是并没有什么用,试过)在conda
环境中指定安装了2.6.1版本的protoc
,但是在终端中使用protoc --version
查看依然的是3.4.0,并不知道为什么。
![](https://img.haomeiwen.com/i3241162/15bfc572d10bdbac.png)
博客里有说先用apt-get
卸载libprotoc
库,但是我看了一下,卸载这个库的话,ros-kinetic-desktop-full
也会被卸载,看来libprotoc
和ros
是绑定的了,那么能不能修改系统默认protoc
呢?我猜在/usr/bin
里直接修改链接地址是可以的,但是万一。。。ros
以后要用。。。
最终的解决方法是:修改RoboRTS
的CMakeLists.txt
文件,直接吧anaconda
的包含文件夹加入。
include_directories(${CMAKE_SOURCE_DIR} ${catkin_INCLUDE_DIRS} /home/hitcsc/anaconda2/include)
2. 编译过程中对zlib
的依赖问题
/home/hitcsc/anaconda2/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9'
collect2: error: ld returned 1 exit status
查了一下发现是没有zlib
和libpng
,好吧,这个其实是简单的部分,直接
anaconda search -t conda zlib
anaconda search -t conda libpng
找个合适的源然后安装就可以了。