Pangolin could not be found because dependency Eigen3 could not be found.

博客介绍了在配置ManhattanSLAM项目时遇到的CMake错误,原因是Pangolin库找不到其依赖的Eigen3。解决方法是在CMakeLists.txt中找到寻找Eigen3的语句后添加NO_MODULE,避免使用模块查找。按照这个修改后,无需重新安装Pangolin和Eigen3,重建编译即可成功解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错如此下:

CMake Error at CMakeLists.txt:25 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/Pangolin/PangolinConfig.cmake

  but it set Pangolin_FOUND to FALSE so package "Pangolin" is considered to
  be NOT FOUND.  Reason given by package:

  Pangolin could not be found because dependency Eigen3 could not be found.



-- Configuring incomplete, errors occurred!
See also "/home/dongying/study/ManhattanSLAM/build/CMakeFiles/CMakeOutput.log".
See also "/home/dongying/study/ManhattanSLAM/build/CMakeFiles/CMakeError.log".
Makefile:940: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1

解决办法:
不需要重新安装Pangolin及Eigen,修改CMakeLists.txt如下:
在find_package(Eigen3 REQUIRED)后加NO_MUDULE,

find_package(Eigen3 REQUIRED NO_MODULE)

然后重建编译即可成功!

dxinl@dxinl-NUC13VYKi5:~/orb_slam2/semantic_-mapping_on_-orbslam$ cd /home/dxinl/orb_slam2/semantic_-mapping_on_-orbslam && ./build.sh Configuring and building Thirdparty/DBoW2 ... mkdir: 无法创建目录 “build”: 文件已存在 -- Configuring done -- Generating done -- Build files have been written to: /home/dxinl/orb_slam2/semantic_-mapping_on_-orbslam/Thirdparty/DBoW2/build [100%] Built target DBoW2 Configuring and building Thirdparty/g2o ... mkdir: 无法创建目录 “build”: 文件已存在 -- BUILD TYPE:Release -- Compiling on Unix -- Configuring done -- Generating done -- Build files have been written to: /home/dxinl/orb_slam2/semantic_-mapping_on_-orbslam/Thirdparty/g2o/build [100%] Built target g2o Uncompress vocabulary ... Configuring and building ORB_SLAM2 ... mkdir: 无法创建目录 “build”: 文件已存在 Build type: Release -- Eigen found (include: /usr/include/eigen3, version: 3.3.7) -- OpenNI found (version: 1.5.4.0, include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- OpenNI2 found (version: 2.2.0.33, include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so) ** WARNING ** io features related to pcap will be disabled ** WARNING ** io features related to png will be disabled -- OpenNI found (version: 1.5.4.0, include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- OpenNI2 found (version: 2.2.0.33, include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so) -- looking for PCL_COMMON -- looking for PCL_OCTREE -- looking for PCL_IO -- looking for PCL_KDTREE -- looking for PCL_GEOMETRY -- looking for PCL_SEARCH -- looking for PCL_VISUALIZATION -- looking for PCL_SAMPLE_CONSENSUS -- looking for PCL_FILTERS -- Eigen3 found at: /usr/include/eigen3 -- Eigen3_DIR set to: /usr/include/eigen3 CMake Error at CMakeLists.txt:53 (find_package): Found package configuration file: /usr/local/lib/cmake/Pangolin/PangolinConfig.cmake but it set Pangolin_FOUND to FALSE so package "Pangolin" is considered to be NOT FOUND. Reason given by package: Pangolin could not be found because dependency Eigen3 could not
03-17
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值