在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 小时前
传输层UDP/TCP协议
linux·网络·c++·网络协议·tcp/ip·udp
ltl3 小时前
机密计算:SGX、SEV-SNP、TDX 与 ARM CCA
linux
ltl3 小时前
互联与网络:NVLink、InfiniBand、RoCE 与国产替代
linux
码上上班3 小时前
tengine知识点
linux·服务器·centos
雾时之林6 小时前
Linux--软件管理、源码包安装
linux·服务器·数据库
sxstj9 小时前
Ubuntu 完整安装并启用 Flatpak 教程
linux·运维·ubuntu
RisunJan10 小时前
Linux命令-sshd(SSH 服务器守护进程)
linux·服务器·ssh
天疆说10 小时前
Ubuntu 26.04 下 Intel Meteor Lake 核显 + NPU 驱动配置与 PyTorch NPU 推理实测
linux·pytorch·ubuntu
2401_8685347810 小时前
存储与虚拟化
linux·网络协议
mounter62510 小时前
突破单点限制:BPF 多跟踪点高效附加机制与新 ftrace 架构解析
linux·ebpf·linux kernel·kernel·ftrace