在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
相关推荐
zh路西法1 小时前
【navigation2全局路径更新频率修正】行为树框架的巧妙利用
linux
苏宸啊2 小时前
IPC管道
linux·c++
bush42 小时前
嵌入式linux学习记录十,定时器
linux·嵌入式
峥无2 小时前
Linux进程信号:从基础概念到内核底层原理
linux·运维·服务器·信号处理
广州灵眸科技有限公司2 小时前
瑞芯微RV1126B开发板(EASY-EAI-PI2) 开发(编译)方式说明
linux·服务器·单片机·嵌入式硬件·电脑
北山有鸟3 小时前
用开发板的.config替换ubuntu中内核源码目录的.config
linux·运维·ubuntu
jcbut3 小时前
离线安装dify 1.7
linux·运维·dify
云计算磊哥@3 小时前
运维开发宝典024-Linux云计算运维入门阶段总结
linux·运维·运维开发
江华森3 小时前
《Linux内核技术实战:从Page Cache到CPU调度的深度解构》博客大纲(26讲精编版)
linux
知无不研4 小时前
对套接字的深入理解
linux·服务器·网络·c++·socket·网络套接字