How To Install libsqlexpr-ocaml-dev on Ubuntu 18.04

In this tutorial we learn how to install libsqlexpr-ocaml-dev on Ubuntu 18.04. libsqlexpr-ocaml-dev is type-safe, convenient SQLite database access (development)

Introduction

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

What is libsqlexpr-ocaml-dev

libsqlexpr-ocaml-dev is:

Minimalistic library and syntax extension for type-safe, convenient execution of SQL statements. Currently compatible with Sqlite3.

Sqlexpr features:

  • automated prepared statement caching, param binding, data extraction, error checking (including automatic stmt reset to avoid BUSY/LOCKED errors in subsequent queries), stmt finalization on db close, etc.
  • HOFs like iter, fold, transaction
  • support for different concurrency models: everything is functorized over a THREAD monad, so you can for instance do concurrent folds/iters with Lwt
  • support for SQL stmt syntax checks and some extra semantic checking (column names, etc)

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

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

Install libsqlexpr-ocaml-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsqlexpr-ocaml-dev

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

sudo aptitude -y install libsqlexpr-ocaml-dev

How To Uninstall libsqlexpr-ocaml-dev on Ubuntu 18.04

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

sudo apt-get remove libsqlexpr-ocaml-dev

Uninstall libsqlexpr-ocaml-dev And Its Dependencies

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

Remove libsqlexpr-ocaml-dev Configurations and Data

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

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

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

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

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

References

Summary

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