How To Install libgmp-ocaml-dev on Ubuntu 18.04

In this tutorial we learn how to install libgmp-ocaml-dev on Ubuntu 18.04. libgmp-ocaml-dev is OCaml bindings for the GNU multiprecision arithmetic library

Introduction

In this tutorial we learn how to install libgmp-ocaml-dev on Ubuntu 18.04.

What is libgmp-ocaml-dev

libgmp-ocaml-dev 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 static library, OCaml library and interface for developing applications to use libgmp-ocaml

There are three methods to install libgmp-ocaml-dev on Ubuntu 18.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 libgmp-ocaml-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 libgmp-ocaml-dev using apt-get by running the following command:

sudo apt-get -y install libgmp-ocaml-dev

Install libgmp-ocaml-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libgmp-ocaml-dev

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

sudo aptitude -y install libgmp-ocaml-dev

How To Uninstall libgmp-ocaml-dev on Ubuntu 18.04

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

sudo apt-get remove libgmp-ocaml-dev

Uninstall libgmp-ocaml-dev And Its Dependencies

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

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

Remove libgmp-ocaml-dev Configurations and Data

To remove libgmp-ocaml-dev configuration and data from Ubuntu 18.04 we can use the following command:

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

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

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

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

References

Summary

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