How To Install camlp5 on Debian 9

In this tutorial we learn how to install camlp5 on Debian 9. camlp5 is Pre Processor Pretty Printer for OCaml - classical version

Introduction

In this tutorial we learn how to install camlp5 on Debian 9.

What is camlp5

camlp5 is:

Objective Caml (OCaml) is an implementation of the ML language, based on the Caml Light dialect extended with a complete class-based object system and a powerful module system in the style of Standard ML.

CamlP4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers tools for syntax (Stream Parsers and Grammars) and the ability to modify the concrete syntax of the language (Quotations, Syntax Extensions).

This package contains the “classical” version of CamlP4 executables and libraries for pre-processing and pretty-printing OCaml sources both interactively and in a batch fashion. The “classical” version is the implementation of CamlP4 which used to be distributed with OCaml before the release of version 3.10.

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

Install camlp5 Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install camlp5

Install camlp5 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install camlp5 using apt by running the following command:

sudo apt -y install camlp5

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

sudo aptitude -y install camlp5

How To Uninstall camlp5 on Debian 9

To uninstall only the camlp5 package we can use the following command:

sudo apt-get remove camlp5

Uninstall camlp5 And Its Dependencies

To uninstall camlp5 and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove camlp5

Remove camlp5 Configurations and Data

To remove camlp5 configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge camlp5

Remove camlp5 configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge camlp5

Dependencies

camlp5 have the following dependencies:

References

Summary

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