环境:
Ubuntu18.04 + ROS melodic + Anaconda3
在使用下面的指令编译Tiago的官方包时:
catkin build -DCATKIN_ENABLE_TESTING=0 -j $(expr `nproc` / 2)
第八十多个包出现报错:
Errors << gazebo_plugins:cmake /home/sjh/project/Tiago_ws/logs/gazebo_plugins/build.cmake.001.log CMake Error at /home/sjh/anaconda3/lib/cmake/Boost-1.73.0/BoostConfig.cmake:141 (find_package): Could not find a package configuration file provided by "boost_signals" (requested version 1.73.0) with any of the following names: boost_signalsConfig.cmake boost_signals-config.cmake Add the installation prefix of "boost_signals" to CMAKE_PREFIX_PATH or set "boost_signals_DIR" to a directory containing one of the above files. If "boost_signals" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /home/sjh/anaconda3/lib/cmake/Boost-1.73.0/BoostConfig.cmake:258 (boost_find_component) /usr/share/cmake-3.10/Modules/FindBoost.cmake:242 (find_package) /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:159 (find_package) /home/sjh/project/Tiago_ws/src/gazebo_ros_pkgs/gazebo_dev/cmake/gazebo_dev-extras.cmake:2 (find_package) /home/sjh/project/Tiago_ws/devel/share/gazebo_dev/cmake/gazebo_devConfig.cmake:222 (include) /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) CMakeLists.txt:6 (find_package)
开始以为是网上其他人提到的boost_signals的问题,结果一直没能解决,后来发现是conda环境导致的,关掉conda环境重新编译就好了
先回到文件夹中,将已存的【build】【log】【devel】文件夹删除
然后回到终端, 关掉conda环境
conda deactivate
重新编译
catkin build -DCATKIN_ENABLE_TESTING=0 -j $(expr `nproc` / 2)
正常编译且成功