How To Install mlton-basis on Ubuntu 18.04

In this tutorial we learn how to install mlton-basis on Ubuntu 18.04. mlton-basis is Optimizing compiler for Standard ML - basis library

Introduction

In this tutorial we learn how to install mlton-basis on Ubuntu 18.04.

What is mlton-basis

mlton-basis is:

MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries.

This package includes the cross-platform basis.

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

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

sudo apt-get update

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

sudo apt-get -y install mlton-basis

Install mlton-basis Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install mlton-basis

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

sudo aptitude -y install mlton-basis

How To Uninstall mlton-basis on Ubuntu 18.04

To uninstall only the mlton-basis package we can use the following command:

sudo apt-get remove mlton-basis

Uninstall mlton-basis And Its Dependencies

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

sudo apt-get -y autoremove mlton-basis

Remove mlton-basis Configurations and Data

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

sudo apt-get -y purge mlton-basis

Remove mlton-basis configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge mlton-basis

References

Summary

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