How To Install libsharp-dev on Ubuntu 22.04
Introduction
In this tutorial we learn how to install libsharp-dev
on Ubuntu 22.04.
What is libsharp-dev
libsharp-dev is:
libsharp is a library for spherical harmonic transforms (SHTs), which evolved from the libpsht library, addressing several of its shortcomings, such as adding MPI support for distributed memory systems and SHTs of fields with arbitrary spin, but also supporting new developments in CPU instruction sets like the Advanced Vector Extensions (AVX) or fused multiply-accumulate (FMA) instructions. The library is implemented in portable C99 and provides an interface that can be easily accessed from other programming languages such as C++, Fortran, Python etc. Generally, libsharp’s performance is at least on par with that of its predecessor; however, significant improvements were made to the algorithms for scalar SHTs, which are roughly twice as fast when using the same CPU capabilities.
This package provides the static library and headers.
There are three methods to install libsharp-dev
on Ubuntu 22.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libsharp-dev Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libsharp-dev
using apt-get
by running the following command:
sudo apt-get -y install libsharp-dev
Install libsharp-dev Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libsharp-dev
using apt
by running the following command:
sudo apt -y install libsharp-dev
Install libsharp-dev Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libsharp-dev
using aptitude
by running the following command:
sudo aptitude -y install libsharp-dev
How To Uninstall libsharp-dev on Ubuntu 22.04
To uninstall only the libsharp-dev
package we can use the following command:
sudo apt-get remove libsharp-dev
Uninstall libsharp-dev And Its Dependencies
To uninstall libsharp-dev
and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove libsharp-dev
Remove libsharp-dev Configurations and Data
To remove libsharp-dev
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge libsharp-dev
Remove libsharp-dev configuration, data, and all of its dependencies
We can use the following command to remove libsharp-dev
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libsharp-dev
References
Summary
In this tutorial we learn how to install libsharp-dev
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.