cmake 找不到 eigen3 包

cmake 找不到 eigen3 包

在软件安装过程中安装 eigen3.2 后出现此 cmake 错误,有没有明确的建议来修复它?

-VirtualBox:~/ceres_build$ cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected Ceres being used as a git submodule, adding commit hook for Gerrit to: /home/ceres-solver/.git
-- Detected Ceres version: 2.0.0 from /home/ceres-solver/include/ceres/version.h
-- Detected available Ceres threading models: [CXX_THREADS, OPENMP, NO_THREADS]
-- Building with C++14
CMake Error at CMakeLists.txt:242 (find_package):
  Could not find a package configuration file provided by "Eigen3" (requested
  version 3.3) 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 "/home/ceres_build/CMakeFiles/CMakeOutput.log".

答案1

你必须安装Eigen3 开发包经过

sudo apt-add-repository universe
sudo apt-get install libeigen3-dev

然后重试。

另请注意谷神星本身包含在 Ubuntu 存储库中。您必须使用以下命令安装它:

sudo apt-get install libceres-dev

所以您不需要自己编译。

相关内容