How To Install ceres-solver on CentOS 8

ceres-solver is A non-linear least squares minimizer

Introduction

In this tutorial we learn how to install ceres-solver on CentOS 8.

What is ceres-solver

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Notable use of Ceres Solver is for the image alignment in Google Maps and for vehicle pose in Google Street View. Ceres Solver can solve two kinds of problems. 1. Non-linear Least Squares problems with bounds constraints. 2. General unconstrained optimization problems. Features include - A friendly API - Automatic and numeric differentiation - Robust loss functions - Local parameterizations - Threaded Jacobian evaluators and linear solvers - Trust region solvers with non-monotonic steps (Levenberg-Marquardt and Dogleg (Powell & Subspace)) - Line search solvers (L-BFGS and Nonlinear CG) - Dense QR and Cholesky factorization (using Eigen) for small problems - Sparse Cholesky factorization (using SuiteSparse) for large sparse problems - Specialized solvers for bundle adjustment problems in computer vision - Iterative linear solvers for general sparse and bundle adjustment problems - Runs on Linux, Windows, Mac OS X, Android, and iOS

We can use yum or dnf to install ceres-solver on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install ceres-solver.

Install ceres-solver on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install ceres-solver using dnf by running the following command:

sudo dnf -y install ceres-solver

Install ceres-solver on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install ceres-solver using yum by running the following command:

sudo yum -y install ceres-solver

How To Uninstall ceres-solver on CentOS 8

To uninstall only the ceres-solver package we can use the following command:

sudo dnf remove ceres-solver

ceres-solver Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/57c2f261792fda4b6a3a3316d73158ceb925aa
/usr/lib64/libceres.so.1
/usr/lib64/libceres.so.1.14.0
/usr/share/doc/ceres-solver
/usr/share/doc/ceres-solver/README.md
/usr/share/licenses/ceres-solver
/usr/share/licenses/ceres-solver/LICENSE

References

Summary

In this tutorial we learn how to install ceres-solver on CentOS 8 using yum and dnf.