How To Install cl-global-vars on Ubuntu 22.04

In this tutorial we learn how to install cl-global-vars on Ubuntu 22.04. cl-global-vars is efficient global variables in Common Lisp

Introduction

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

What is cl-global-vars

cl-global-vars is:

In Common Lisp, a special variable that is never dynamically bound typically serves as a stand-in for a global variable. This library provides true global variables that are implemented by some compilers. An attempt to rebind a global variable properly results in a compiler error. That is, a global variable cannot be dynamically bound.

Global variables therefore allow one to communicate an intended usage that differs from special variables. Global variables are also more efficient than special variables, especially in the presence of threads.

There are three methods to install cl-global-vars 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-global-vars 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-global-vars using apt-get by running the following command:

sudo apt-get -y install cl-global-vars

Install cl-global-vars Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install cl-global-vars

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

sudo aptitude -y install cl-global-vars

How To Uninstall cl-global-vars on Ubuntu 22.04

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

sudo apt-get remove cl-global-vars

Uninstall cl-global-vars And Its Dependencies

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

sudo apt-get -y autoremove cl-global-vars

Remove cl-global-vars Configurations and Data

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

sudo apt-get -y purge cl-global-vars

Remove cl-global-vars configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge cl-global-vars

References

Summary

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