How To Install cl-babel on Ubuntu 22.04

In this tutorial we learn how to install cl-babel on Ubuntu 22.04. cl-babel is charset encoding/decoding library for Common Lisp

Introduction

In this tutorial we learn how to install cl-babel on Ubuntu 22.04.

What is cl-babel

cl-babel is:

Babel is a charset encoding/decoding library, not unlike GNU libiconv, but completely written in Common Lisp.

It strives to achieve decent performance. To that effect, it uses OpenMCL’s approach of calculating the destination buffer size in advance. Most of the encoding/decoding algorithms have been adapted from OpenMCL’s source.

Another important goal is reusability. Similarly to SBCL, it defines an interface wherein the algorithms can be reused between a variety of data types so long we’re dealing with conversions between octets and unicode code points.

Babel comes with converters between strings and (unsigned-byte 8) vectors but can be easily extended to deal with, e.g., strings and foreign memory, vectors and Closure’s runes, etc…

There are three methods to install cl-babel on Ubuntu 22.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-babel 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-babel using apt-get by running the following command:

sudo apt-get -y install cl-babel

Install cl-babel Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install cl-babel

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

sudo aptitude -y install cl-babel

How To Uninstall cl-babel on Ubuntu 22.04

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

sudo apt-get remove cl-babel

Uninstall cl-babel And Its Dependencies

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

sudo apt-get -y autoremove cl-babel

Remove cl-babel Configurations and Data

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

sudo apt-get -y purge cl-babel

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

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

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

References

Summary

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