How To Install nqp on Ubuntu 22.04

In this tutorial we learn how to install nqp on Ubuntu 22.04. nqp is Not Quite Perl compiler

Introduction

In this tutorial we learn how to install nqp on Ubuntu 22.04.

What is nqp

nqp is:

“Not Quite Perl” is a compiler for quickly generating PIR routines from Perl6-like code. The key feature of NQP is that it’s designed to be a very small compiler (as compared with, say, perl6 or Rakudo) and is focused on being a high-level way to create compilers and libraries for virtual machines (such as the JVM, and MoarVM).

Unlike a full-fledged implementation of Perl 6, NQP strives to have as small a runtime footprint as it can, while still providing a Perl 6 object model and regular expression engine for the virtual machine.

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

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

sudo apt-get update

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

sudo apt-get -y install nqp

Install nqp Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install nqp

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

sudo aptitude -y install nqp

How To Uninstall nqp on Ubuntu 22.04

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

sudo apt-get remove nqp

Uninstall nqp And Its Dependencies

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

sudo apt-get -y autoremove nqp

Remove nqp Configurations and Data

To remove nqp configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge nqp

Remove nqp configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge nqp

References

Summary

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