Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Perl installation on Ubuntu and/or Mac OS

by merrymonk (Hermit)
on Aug 01, 2024 at 20:36 UTC ( [id://11160836]=perlquestion: print w/replies, xml ) Need Help??

merrymonk has asked for the wisdom of the Perl Monks concerning the following question:

Someone wants to use my Perl on Ubuntu and/or MAC OS. They are a competent PC user but not a programmer. They will need Perl5 with Tk
I see that there are several sites where installation details for both these operating systems are described.
Could any Monk help by suggesting which site(s) would be the most appropriate and which of the two operating systems are likely to the simpler to try?
  • Comment on Perl installation on Ubuntu and/or Mac OS

Replies are listed 'Best First'.
Re: Perl installation on Ubuntu and/or Mac OS
by ikegami (Patriarch) on Aug 01, 2024 at 22:24 UTC

    Ubuntu:

    sudo apt install perl perl-tk

    You could also install your own Perl using perlbrew. This is great if you're in a shared environment, if you better control over the versions of Perl and modules, or if you want to install modules which aren't provided by your system's package manager.

    curl -L https://install.perlbrew.pl | bash perlbrew install 5.40.0 cpan Tk

    Don't forget to add to your shell's startup script as directed.

Re: Perl installation on Ubuntu and/or Mac OS
by mldvx4 (Hermit) on Aug 02, 2024 at 08:37 UTC

    As far as I know both have Perl installed by default. There are ways to install different versions of Perl on MacOS and switch between them but that is another matter.

    Open the terminal and enter,

    perl -v

    Ubuntu 24.04 aka Noble Numbat has Perl version 5.38.2 installed by default. There are some modules in place already, but when you add more it pays to make every effort to get the modules from the official repositories before turning to CPAN itself.

    As for MacOS, I have not used that for years but homebrew would be the way to add any missing modules before turning to raw CPAN.

Re: Perl installation on Ubuntu and/or Mac OS
by Anonymous Monk on Aug 02, 2024 at 04:30 UTC
    Although I've never used the Ubuntu distro(s), any Linux (or Unix) or Mac OSX I've used, already had Perl installed.
    Not sure about Tk, never used it, but it should be installable from the std repos on Linux .

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11160836]
Approved by marto
Front-paged by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2026-02-07 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.