Score:-1

Why Ubuntu (20.04) doesn't have Perl preinstalled?

bn flag

https://unix.stackexchange.com/questions/48018/why-is-perl-installed-by-default-with-most-linux-distributions

https://stackoverflow.com/questions/1164133/are-there-unix-platforms-where-perl-is-not-installed-by-default

I only found these posts and the questions are opposite. I use (or I want to) Perl pretty regularly in daily use or in shell scripts, but it bumps me up every time because I know that in order for my scripts to work I firstly need to install Perl. Can someone share some information about why is that the case with Ubuntu?

cn flag
That's not true., perl IS installed on all Linux, not just Ubuntu. You mght need some extra modules but `perl -v` shows perl 5 version 34 on 22.10
Steffen Ullrich avatar
in flag
[perl-base is marked as essential](https://packages.ubuntu.com/focal/perl-base), which means that it is included in the minimal setup. So your question seems to be based on wrong assumptions.
Andrew15_5 avatar
bn flag
Sorry, I was looking for `perl`/`perl6` packages in `apt`. I didn't see (and know) that there is actually another Perl packages that indeed comes preinstalled (`perl-base`). Thank you, now I can sleep peacefully.
terdon avatar
cn flag
Note that Perl6 is not Perl, it's another language, now called [Raku](https://en.wikipedia.org/wiki/Raku_(programming_language)), which is based on Perl but significantly different.
Score:0
pe flag

Ubuntu 20.04 Does have Perl installed.
At least if you look at the official Ubuntu docker images by Canonical.

tomodachi@delacroix ~ $ docker run -ti ubuntu:20.04 perl --version
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.

This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 57 registered patches, see perl -V for more detail)

Copyright 1987-2019, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

But it's no longer seen as the best choice for a high level scripting due not being available on all platforms, not being that popular and not fully backwards compatible with older versions of Perl.

If you want a programming language more likely to be fully supported in the future and across distributions and operating systems look into Python or Ansible for your local shell-scripting and automation needs

Andrew15_5 avatar
bn flag
Yes, thank you for checking. [Package names tricked me](https://askubuntu.com/questions/1446614/why-ubuntu-20-04-doesnt-have-perl-preinstalled#comment2525006_1446614), that's all. I lived with self-made lie for soo long. I'm so relieved right now.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.