How To Install libcairo-ocaml-dev on Ubuntu 18.04

In this tutorial we learn how to install libcairo-ocaml-dev on Ubuntu 18.04. libcairo-ocaml-dev is OCaml bindings for Cairo

Introduction

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

What is libcairo-ocaml-dev

libcairo-ocaml-dev is:

Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends. Paths consist of line segments and cubic splines and can be rendered at any width with various join and cap styles. All colors may be specified with optional translucence (opacity/alpha) and combined using the extended Porter/Duff compositing algebra as found in the X Render Extension.

Cairo exports a stateful rendering API similar in spirit to the path construction, text, and painting operators of PostScript, (with the significant addition of translucence in the imaging model). When complete, the API is intended to support the complete imaging model of PDF 1.4.

This package contains all the development stuff you need to use Cairo in your OCaml programs. The following backends are supported: PostScript, PDF, PNG, In-memory images and X11.

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

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

Install libcairo-ocaml-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libcairo-ocaml-dev

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

sudo aptitude -y install libcairo-ocaml-dev

How To Uninstall libcairo-ocaml-dev on Ubuntu 18.04

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

sudo apt-get remove libcairo-ocaml-dev

Uninstall libcairo-ocaml-dev And Its Dependencies

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

Remove libcairo-ocaml-dev Configurations and Data

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

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

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

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

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

References

Summary

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