How To Install perl on Ubuntu 20.04

In this tutorial we learn how to install perl on Ubuntu 20.04. perl is Larry Walls Practical Extraction and Report Language Larry Walls Practical Extraction and Report Language

Introduction

In this tutorial we learn how to install perl on Ubuntu 20.04.

What is perl

perl is:

Perl is a highly capable, feature-rich programming language with over 20 years of development. Perl 5 runs on over 100 platforms from portables to mainframes. Perl is suitable for both rapid prototyping and large scale development projects.

Perl 5 supports many programming styles, including procedural, functional, and object-oriented. In addition to this, it is supported by an ever-growing collection of reusable modules which accelerate development. Some of these modules include Web frameworks, database integration, networking protocols, and encryption. Perl provides interfaces to C and C++ for custom extension development. Task: server, print-server, ubuntu-desktop-minimal, lamp-server, ubuntu-desktop, cloud-image, postgresql-server, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop Build-Essential: yes

Package: perl Architecture: amd64 Version: 5.30.0-9build1 Multi-Arch: allowed Priority: optional Section: perl Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Niko Tyni [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 745 Provides: libansicolor-perl (= 4.06), libarchive-tar-perl (= 2.32), libattribute-handlers-perl (= 1.01), libautodie-perl (= 2.29-2), libcompress-raw-bzip2-perl (= 2.084), libcompress-raw-zlib-perl (= 2.084), libcompress-zlib-perl (= 2.084), libcpan-meta-perl (= 2.150010), libcpan-meta-requirements-perl (= 2.140), libcpan-meta-yaml-perl (= 0.018), libdigest-md5-perl (= 2.55), libdigest-perl (= 1.17.01), libdigest-sha-perl (= 6.02), libencode-perl (= 3.01), libexperimental-perl (= 0.020), libextutils-cbuilder-perl (= 0.280231), libextutils-command-perl (= 7.34), libextutils-install-perl (= 2.14), libextutils-parsexs-perl (= 3.400000), libfile-spec-perl (= 3.7800), libhttp-tiny-perl (= 0.076), libi18n-langtags-perl (= 0.43), libio-compress-base-perl (= 2.084), libio-compress-bzip2-perl (= 2.084), libio-compress-perl (= 2.084), libio-compress-zlib-perl (= 2.084), libio-zlib-perl (= 1.10), libjson-pp-perl (= 4.02000), liblocale-maketext-perl (= 1.29), liblocale-maketext-simple-perl (= 0.21.01), libmath-bigint-perl (= 1.999816), libmath-complex-perl (= 1.5901), libmime-base64-perl (= 3.15), libmodule-corelist-perl (= 5.20190522), libmodule-load-conditional-perl (= 0.68), libmodule-load-perl (= 0.34), libmodule-metadata-perl (= 1.000036), libnet-perl (= 1:3.11), libnet-ping-perl (= 2.71), libparams-check-perl (= 0.38), libparent-perl (= 0.237), libparse-cpan-meta-perl (= 2.150010), libperl-ostype-perl (= 1.010), libpod-escapes-perl (= 1.07), libpod-parser-perl (= 1.63), libpod-simple-perl (= 3.35), libstorable-perl (= 3.15), libsys-syslog-perl (= 0.35), libtest-harness-perl (= 3.42), libtest-simple-perl (= 1.302162), libtest-tester-perl (= 1.302162), libtest-use-ok-perl (= 1.302162), libthread-queue-perl (= 3.13), libthreads-perl (= 2.22), libthreads-shared-perl (= 1.60), libtime-hires-perl (= 1.9760), libtime-local-perl (= 1.2800), libtime-piece-perl (= 1.3300), libunicode-collate-perl (= 1.27), libversion-perl (= 1:0.9924), libversion-requirements-perl, podlators-perl (= 4.11) Pre-Depends: dpkg (>= 1.17.17) Depends: perl-base (= 5.30.0-9build1), perl-modules-5.30 (>= 5.30.0-9build1), libperl5.30 (= 5.30.0-9build1) Recommends: netbase Suggests: perl-doc, libterm-readline-gnu-perl | libterm-readline-perl-perl, make, libb-debug-perl, liblocale-codes-perl Conflicts: libjson-pp-perl (« 2.27200-2) Breaks: apt-show-versions (« 0.22.10), libdist-inkt-perl (« 0.024-5), libmarc-charset-perl (« 1.35-3), libperl-dev (« 5.24.0~), perl-doc (« 5.30.0-1) Replaces: perl-base (« 5.30.0-2), perl-modules (« 5.22.0~) Filename: pool/main/p/perl/perl_5.30.0-9build1_amd64.deb Size: 224080 MD5sum: dbd4c30371a1139d2f778f7abbdfd8a8 SHA1: 11f69a665c58366ccf79ea689b22bdd9f510d795 SHA256: 2c8532d339b5145853d358f7b3cd6567dac6770af86b0f4254611a569e515123 Homepage: http://dev.perl.org/perl5/ Description-en: Larry Wall’s Practical Extraction and Report Language Perl is a highly capable, feature-rich programming language with over 20 years of development. Perl 5 runs on over 100 platforms from portables to mainframes. Perl is suitable for both rapid prototyping and large scale development projects.

Perl 5 supports many programming styles, including procedural, functional, and object-oriented. In addition to this, it is supported by an ever-growing collection of reusable modules which accelerate development. Some of these modules include Web frameworks, database integration, networking protocols, and encryption. Perl provides interfaces to C and C++ for custom extension development. Task: server, print-server, ubuntu-desktop-minimal, lamp-server, ubuntu-desktop, cloud-image, postgresql-server, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop Build-Essential: yes

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

sudo apt-get -y install perl

Install perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install perl

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

sudo aptitude -y install perl

How To Uninstall perl on Ubuntu 20.04

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

sudo apt-get remove perl

Uninstall perl And Its Dependencies

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

sudo apt-get -y autoremove perl

Remove perl Configurations and Data

To remove perl configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge perl

Remove perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge perl

References

Summary

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