在ubuntu18.04上安装ceres总结

ceres下载

在ubuntu18.04版本中安装2.2.0版本存在很多问题,下载2.1.0或者更早的1.14.0可以跳过很多麻烦。

法1:在官网installation的Getting the source code章节,直接点击"the latest stable release"。

法2:在ubuntu的bash中使用wge下载:[适合于下载指定的版本]

bash 复制代码
wget http://ceres-solver.org/ceres-solver-2.2.0.tar.gz
wget http://ceres-solver.org/ceres-solver-2.1.0.tar.gz
wget http://ceres-solver.org/ceres-solver-1.14.0.tar.gz

ceres安装

参考官网的安装步骤:[链接]

注意阅读官网Dependencies要求的eigen,camke,...等依赖的版本号是否兼容。

开始安装依赖

bash 复制代码
# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# Use ATLAS for BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse (optional)
sudo apt-get install libsuitesparse-dev

开始安装ceres

bash 复制代码
tar zxf ceres-solver-2.1.0.tar.gz
# cd到解压后的ceres-solver目录
cd ceres-solver-2.1.0
# 创建一个编译结果的存放目录,并cd进去
mkdir build
cd build
# 执行cmake, 这里设置了ceres的安装目录是/usr/local/ceres,可根据个人情况指定
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PRE_FIX=/usr/local/ceres ..
# -j3是使用3个cpu core来编译,根据个人CPU的个数给定,也可以去掉-j3
make -j3
# make test不是必须的
make test
# Optionally install Ceres, it can also be exported using CMake which
# allows Ceres to be used without requiring installation, see the documentation
# for the EXPORT_BUILD_DIR option for more information.
sudo make install
相关推荐
头发还没掉光光3 小时前
Linux网络之IP协议
linux·运维·网络·c++·tcp/ip
一个平凡而乐于分享的小比特3 小时前
Linux内核中的container_of宏详解
linux·container_of
lcreek10 小时前
Linux信号机制详解:阻塞信号集与未决信号集
linux·操作系统·系统编程
shandianchengzi11 小时前
【记录】Tailscale|部署 Tailscale 到 linux 主机或 Docker 上
linux·运维·docker·tailscale
John Song11 小时前
Linux机器怎么查看进程内存占用情况
linux·运维·chrome
sichuanwuyi11 小时前
Wydevops工具的价值分析
linux·微服务·架构·kubernetes·jenkins
持戒波罗蜜12 小时前
ubuntu20解决intel wifi 驱动问题
linux·驱动开发·嵌入式硬件·ubuntu
不做无法实现的梦~12 小时前
使用ros2来跑通mid360的驱动包
linux·嵌入式硬件·机器人·自动驾驶
点云SLAM12 小时前
C++内存泄漏检测之Windows 专用工具(CRT Debug、Dr.Memory)和Linux 专业工具(ASan 、heaptrack)
linux·c++·windows·asan·dr.memory·c++内存泄漏检测·c++内存管理