出现问题
编译过程中遇到:
“fatal error: ceres/ceres.h: 没有那个文件或目录”
“Invoking "make -j8 -l8" failed”
问题出现在你的Ceres安装出现问题
解决方法
重新安装Ceres
1.将安装包下载到主目录中
链接:ceres-solver-2.2.0.tar.gz
提取码:3358
2.安装所有依赖项
sudo apt-get install cmake
sudo apt-get install libgoogle-glog-dev libgflags-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libsuitesparse-dev
3.现在已经准备好构建、测试和安装 Ceres。
到主目录下打开终端
tar zxf ceres-solver-2.2.0.tar.gz
mkdir ceres-bin
cd ceres-bin
cmake ../ceres-solver-2.2.0
make -j3
make test
make install
执行完可能会这样:
CMake Error at cmake_install.cmake:46 (file):
file cannot create directory: /usr/local/lib/cmake/Ceres. Maybe need
administrative privileges.
执行管理员权限就好了:
sudo make install