How To Install ocaml-ulex08 on Ubuntu 18.04

In this tutorial we learn how to install ocaml-ulex08 on Ubuntu 18.04. ocaml-ulex08 is OCaml lexer generator with Unicode support - CamlP5 version

Introduction

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

What is ocaml-ulex08

ocaml-ulex08 is:

ulex is a lexer generator for the Objective Caml (OCaml) programming language.

It is implemented as a Camlp4 syntax extension: lexer specifications are embedded in regular OCaml code.

Generated lexers work with a new kind of “lexbuf” that supports Unicode; a single lexer can work with arbitrary encodings of the input stream.

This package ships the latest release of ulex compatible with Camlp4 pre OCaml 3.10 (now called CamlP5). Applications which need both ulex and the legacy version of Camlp4 might need to use this package instead of ocaml-ulex (the latter shipping the latest available ulex release which requires Camlp4 >= 3.10)).

There are three methods to install ocaml-ulex08 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 ocaml-ulex08 Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install ocaml-ulex08

Install ocaml-ulex08 Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ocaml-ulex08

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

sudo aptitude -y install ocaml-ulex08

How To Uninstall ocaml-ulex08 on Ubuntu 18.04

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

sudo apt-get remove ocaml-ulex08

Uninstall ocaml-ulex08 And Its Dependencies

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

sudo apt-get -y autoremove ocaml-ulex08

Remove ocaml-ulex08 Configurations and Data

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

sudo apt-get -y purge ocaml-ulex08

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

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

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

References

Summary

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