在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
相关推荐
无足鸟ICT4 小时前
【RHCA+】ipcrm命令(删除IPC资源)
linux
星恒随风5 小时前
MySQL 从零入门(四):表的增删改查与基础查询详解
linux·服务器·数据库·笔记·mysql
Zucker n6 小时前
文献发现、课题组织与证据可追溯的论文阅读。
论文阅读·windows·ubuntu
陈希1238 小时前
Linux 网络诊断工具实战:ping、curl、tcpdump、mtr、dig 用法详解
linux·网络·tcpdump
进击的荆棘8 小时前
Linux系统——线程同步与互斥之线程池和安全
linux·运维·服务器·安全·单例模式·线程
刘大望8 小时前
不用买开发板:用 QEMU 走通嵌入式 Linux 全流程(三)存储与网络实地验证
linux·qemu·嵌入式linux·alpine
那明眸似水9 小时前
云原生项目三:Docker秒级启动NextCloud个人网盘存储办公系统
linux·运维·docker·云原生·容器
默|笙21 小时前
【Linux网络】网络层协议 IP(1)理解报头、网段划分
linux·网络·tcp/ip
修己xj1 天前
nslookup 使用指南:两种模式与常用查询技巧
linux
唠玖馆1 天前
文件系统详解
linux·文件系统·ext2