当我输入此命令时:
cd /Users/mona/ros_catkin_ws/build_isolated/pcl_ros && /Users/mona/ros_catkin_ws/install_isolated/env.sh cmake /Users/mona/ros_catkin_ws/src/perception_pcl/pcl_ros -DCATKIN_DEVEL_PREFIX=/Users/mona/ros_catkin_ws/devel_isolated/pcl_ros -DCMAKE_INSTALL_PREFIX=/Users/mona/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'
我收到此错误:
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
CMake Error at CMakeLists.txt:7 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/Users/mona/ros_catkin_ws/build_isolated/pcl_ros/CMakeFiles/CMakeOutput.log".
此命令是作为运行此安装命令的一部分运行的
ROS
:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
知道如何解决这个问题吗?
请在此处查看问题的更多详细信息:http://answers.ros.org/question/215080/how-to-add-the-installation-prefix-of-eigen3-to-cmake_prefix_path-or-set-eigen3_dir-到包含上述文件之一的目录/
对于 Linux 用户来说,这可能会像对我一样有帮助:只需通过以下命令安装 eigen3 lib 的开发人员包即可。
sudo apt install libeigen3-dev
您必须安装 Eigen3。它提供了 FindEigen3.cmake 文件。发生错误是因为您要配置的项目依赖于 Eigen3。
如果您安装了 Eigen3,请按照错误消息操作,并将 Eigen3 添加到 CMake 的搜索路径。
不需要从源文件构建和安装 Eigen3。 只需使用 apt-get 安装即可
sudo apt install libeigen3-dev
并检查安装路径,如下所示
dpkg -L libeigen3-dev
....
/usr/share/eigen3
/usr/share/eigen3/cmake <--- you can find this path
/usr/share/eigen3/cmake/Eigen3Config.cmake
/usr/share/eigen3/cmake/Eigen3ConfigVersion.cmake
/usr/share/eigen3/cmake/Eigen3Targets.cmake
并将其添加到CMakeLists.txt
set(Eigen3_DIR /usr/share/eigen3/cmake)
find_package(Eigen3 REQUIRED)