How To Install libcompiler-lexer-perl on Ubuntu 22.04

In this tutorial we learn how to install libcompiler-lexer-perl on Ubuntu 22.04. libcompiler-lexer-perl is Lexical Analyzer for Perl5

Introduction

In this tutorial we learn how to install libcompiler-lexer-perl on Ubuntu 22.04.

What is libcompiler-lexer-perl

libcompiler-lexer-perl is:

Compiler::Lexer provides a lexical analyser for Perl code. Once the Perl code is parsed, the lexer can provide:

  • a list of tokens
  • the list of module used by the Perl code.

This module is written in XS to be faster than a pure Perl implementation

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

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

sudo apt-get update

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

sudo apt-get -y install libcompiler-lexer-perl

Install libcompiler-lexer-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libcompiler-lexer-perl using apt by running the following command:

sudo apt -y install libcompiler-lexer-perl

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

sudo aptitude -y install libcompiler-lexer-perl

How To Uninstall libcompiler-lexer-perl on Ubuntu 22.04

To uninstall only the libcompiler-lexer-perl package we can use the following command:

sudo apt-get remove libcompiler-lexer-perl

Uninstall libcompiler-lexer-perl And Its Dependencies

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

sudo apt-get -y autoremove libcompiler-lexer-perl

Remove libcompiler-lexer-perl Configurations and Data

To remove libcompiler-lexer-perl configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge libcompiler-lexer-perl

Remove libcompiler-lexer-perl configuration, data, and all of its dependencies

We can use the following command to remove libcompiler-lexer-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libcompiler-lexer-perl

References

Summary

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