How To Install libgmp-ocaml on Debian 11

In this tutorial we learn how to install libgmp-ocaml on Debian 11. libgmp-ocaml is OCaml bindings for the GNU multiprecision arithmetic library (runtime)

Introduction

In this tutorial we learn how to install libgmp-ocaml on Debian 11.

What is libgmp-ocaml

libgmp-ocaml is:

This package provides bindings for the GNU multiprecision library (GNU MP) for the language OCaml (caml.inria.fr). It is mostly a 1-1 mapping of the C functions into the OCaml namespace, but also includes some infix operators to make for a cleaner syntax.

This package provides the shared library for running applications linked against libgmp-ocaml

There are three methods to install libgmp-ocaml on Debian 11. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libgmp-ocaml Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libgmp-ocaml using apt-get by running the following command:

sudo apt-get -y install libgmp-ocaml

Install libgmp-ocaml Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libgmp-ocaml using apt by running the following command:

sudo apt -y install libgmp-ocaml

Install libgmp-ocaml 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libgmp-ocaml using aptitude by running the following command:

sudo aptitude -y install libgmp-ocaml

How To Uninstall libgmp-ocaml on Debian 11

To uninstall only the libgmp-ocaml package we can use the following command:

sudo apt-get remove libgmp-ocaml

Uninstall libgmp-ocaml And Its Dependencies

To uninstall libgmp-ocaml and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove libgmp-ocaml

Remove libgmp-ocaml Configurations and Data

To remove libgmp-ocaml configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge libgmp-ocaml

Remove libgmp-ocaml configuration, data, and all of its dependencies

We can use the following command to remove libgmp-ocaml configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libgmp-ocaml

Dependencies

libgmp-ocaml have the following dependencies:

References

Summary

In this tutorial we learn how to install libgmp-ocaml package on Debian 11 using different package management tools: apt, apt-get and aptitude.