How To Install libxtensor-blas-dev on Ubuntu 22.04

In this tutorial we learn how to install libxtensor-blas-dev on Ubuntu 22.04. libxtensor-blas-dev is an extension to xtensor offering bindings to BLAS and LAPACK

Introduction

In this tutorial we learn how to install libxtensor-blas-dev on Ubuntu 22.04.

What is libxtensor-blas-dev

libxtensor-blas-dev is:

xtensor-blas is an extension to the header-only xtensor library, offering bindings to BLAS and LAPACK libraries through cxxblas and cxxlapack from the FLENS project.

xtensor-blas currently provides non-broadcasting dot, norm (1- and 2-norm for vectors), inverse, solve, eig, cross, det, slogdet, matrix_rank, inv, cholesky, qr, svd in the xt::linalg namespace (check the corresponding xlinalg.hpp header for the function signatures). The functions, and signatures, are trying to be 1-to-1 equivalent to NumPy. Low-level functions to interface with BLAS or LAPACK with xtensor containers are also offered in the blas and lapack namespace.

There are three methods to install libxtensor-blas-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 libxtensor-blas-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 libxtensor-blas-dev using apt-get by running the following command:

sudo apt-get -y install libxtensor-blas-dev

Install libxtensor-blas-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libxtensor-blas-dev using apt by running the following command:

sudo apt -y install libxtensor-blas-dev

Install libxtensor-blas-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 libxtensor-blas-dev using aptitude by running the following command:

sudo aptitude -y install libxtensor-blas-dev

How To Uninstall libxtensor-blas-dev on Ubuntu 22.04

To uninstall only the libxtensor-blas-dev package we can use the following command:

sudo apt-get remove libxtensor-blas-dev

Uninstall libxtensor-blas-dev And Its Dependencies

To uninstall libxtensor-blas-dev and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove libxtensor-blas-dev

Remove libxtensor-blas-dev Configurations and Data

To remove libxtensor-blas-dev configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge libxtensor-blas-dev

Remove libxtensor-blas-dev configuration, data, and all of its dependencies

We can use the following command to remove libxtensor-blas-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libxtensor-blas-dev

References

Summary

In this tutorial we learn how to install libxtensor-blas-dev package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.