How To Install sbcl on Ubuntu 18.04

In this tutorial we learn how to install sbcl on Ubuntu 18.04. sbcl is Common Lisp compiler and development system

Introduction

In this tutorial we learn how to install sbcl on Ubuntu 18.04.

What is sbcl

sbcl is:

SBCL is a development environment for the ANSI Common Lisp language. It provides a native-code compiler and an integrated debugger, as well as all the features in the ANSI specification.

SBCL also contains other extensions to the ANSI specification, including a foreign-function interface, a pseudo-server API, user-extensible stream functionality, a Meta-Object Protocol, and an ability to run external processes.

To browse SBCL source definitions with development environments, install the sbcl-source package. For documentation on SBCL’s usage and internals, the package sbcl-doc is provided.

There are three methods to install sbcl 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 sbcl Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install sbcl

Install sbcl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install sbcl using apt by running the following command:

sudo apt -y install sbcl

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

sudo aptitude -y install sbcl

How To Uninstall sbcl on Ubuntu 18.04

To uninstall only the sbcl package we can use the following command:

sudo apt-get remove sbcl

Uninstall sbcl And Its Dependencies

To uninstall sbcl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove sbcl

Remove sbcl Configurations and Data

To remove sbcl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge sbcl

Remove sbcl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge sbcl

References

Summary

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