一、前言
最近在编译工作区间racacer时遇到了几个关于Turtlebot2配置joy依赖关系的问题,记录并和小伙伴们进行分享,希望对有需要的小伙伴有所帮助。
二、配置问题
1.报错:fatal error: spnav.h: No such file or directory
这个问题是系统少库,需要进行安装:
sudo apt-get install libspnav-dev
2.报错:fatal error: bluetooth/bluetooth.h: No such file or directory
还是系统库没有安装完全,再更新安装一下:
sudo apt-get install libbluetooth-dev
3.报错:fatal error: cwiid.h: No such file or directory
(1) 这个错误需要去github上克隆源码,直接附上命令行:
git clone https://github.com/abstrakraft/cwiid/tree/master
(2) 克隆完之后(位置/home/cwiid),在终端执行逐一执行以下命令行:
cd cwiid
aclocal
autoconf
./configure
make
sudo make install
(3) 当执行./configure时,可能会报错“configure: error: flex not found”,执行下面的命令行:
sudo apt-get install flex
(4)继续执行./configure时,可能还是会出现报错“error: bison not found”,执行下面的命令行:
sudo apt-get install bison byacc
(5) 再接着往下执行应该不会再有报错,最后查看一下cwiid.h的位置:
whereis cwiid.h
会出现位置提示:
cwiid: /usr/local/etc/cwiid /usr/local/lib/cwiid
(6) 到这,回过头去编译工作区间就能顺利的编译成功了。