How To Install cl-postmodern on Ubuntu 20.04

In this tutorial we learn how to install cl-postmodern on Ubuntu 20.04. cl-postmodern is Common Lisp library for interacting with PostgreSQL databases

Introduction

In this tutorial we learn how to install cl-postmodern on Ubuntu 20.04.

What is cl-postmodern

cl-postmodern is:

Features efficient communication with the database server without need for foreign libraries, support for UTF-8 on Unicode-aware Lisp implementations, a syntax for mixing SQL and Lisp code, convenient support for prepared statements and stored procedures, a metaclass for simple database-access objects

The biggest differences between this library and CLSQL/CommonSQL are that Postmodern has no intention of being portable across different SQL implementations (it embraces non-standard Postgres features), and approaches extensions like lispy SQL and database access objects in a quite different way. This library was written because the CLSQL approach did not really work for me, your mileage may vary.

There are three methods to install cl-postmodern on Ubuntu 20.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 cl-postmodern Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install cl-postmodern

Install cl-postmodern Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install cl-postmodern

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

sudo aptitude -y install cl-postmodern

How To Uninstall cl-postmodern on Ubuntu 20.04

To uninstall only the cl-postmodern package we can use the following command:

sudo apt-get remove cl-postmodern

Uninstall cl-postmodern And Its Dependencies

To uninstall cl-postmodern and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove cl-postmodern

Remove cl-postmodern Configurations and Data

To remove cl-postmodern configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge cl-postmodern

Remove cl-postmodern configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge cl-postmodern

References

Summary

In this tutorial we learn how to install cl-postmodern package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.