问题解决:CMake Error at /home/sjh/anaconda3/lib/cmake/Boost-1.73.0/BoostConfig.cmake:141的问题

简介: 问题解决:CMake Error at /home/sjh/anaconda3/lib/cmake/Boost-1.73.0/BoostConfig.cmake:141的问题

环境:

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)

正常编译且成功

目录
相关文章
|
6月前
|
Unix C++
在VS2019中CMake生成出现报错
在VS2019中CMake生成出现报错
670 0
在VS2019中CMake生成出现报错
|
3月前
onnxruntime cmake配置
onnxruntime cmake配置
56 2
|
5月前
|
Unix
深入理解 CMake 的 `cmake --build` 命令
深入理解 CMake 的 `cmake --build` 命令
621 1
|
C++
cmake安装与使用
cmake安装与使用
330 0
cmake安装与使用
|
C语言
configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required gcc compiler.
configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required gcc compiler.
155 0
libtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'
libtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'
143 0
|
C语言
编译OpenJDK8:configure error /usr/lib64/ccache/gcc is a symbolic link to ccache
编译OpenJDK8:configure error /usr/lib64/ccache/gcc is a symbolic link to ccache
125 0
CMake教程4:最简单的CMake Library
CMake教程4:最简单的CMake Library
96 0
|
Android开发 C语言
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
最近要编译FFMPEG,但是一真报这个错,我用的是deepin系统。android studio 3.1.2。cmake,gcc,g++都已经安装了,但是编译就过不去,总是报这个错 CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 很是恼火啊。
10769 0