How To Install libppx-visitors-ocaml-dev on Ubuntu 18.04

In this tutorial we learn how to install libppx-visitors-ocaml-dev on Ubuntu 18.04. libppx-visitors-ocaml-dev is OCaml syntax extension for object-oriented visitors

Introduction

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

What is libppx-visitors-ocaml-dev

libppx-visitors-ocaml-dev is:

Visitors is a syntax extension for the OCaml programming language. It allows you to annotate your type definitions, such that a visitor class will be automatically generated. This visitor class contains methods for the traversal of your data structure, like iter, map, fold, etc. It is then easy to override these methods for your needs. This is very convenient when programming with complex algebraic data structures.

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

sudo apt-get -y install libppx-visitors-ocaml-dev

Install libppx-visitors-ocaml-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libppx-visitors-ocaml-dev

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

sudo aptitude -y install libppx-visitors-ocaml-dev

How To Uninstall libppx-visitors-ocaml-dev on Ubuntu 18.04

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

sudo apt-get remove libppx-visitors-ocaml-dev

Uninstall libppx-visitors-ocaml-dev And Its Dependencies

To uninstall libppx-visitors-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 libppx-visitors-ocaml-dev

Remove libppx-visitors-ocaml-dev Configurations and Data

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

sudo apt-get -y purge libppx-visitors-ocaml-dev

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

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

sudo apt-get -y autoremove --purge libppx-visitors-ocaml-dev

References

Summary

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