6

I would like to run some perl-scripts on my server that require perl 5.10. Perl 5.10 seems to be released many years ago and is still not available for CentOS5.

In #rhel I was recommended to install RHEL6, but I use CentOS. In #centos I was jokingly recommended to install CentOS-6.

This leaves me wondering... all other Linux distributions I know already support perl 5.10, except for CentOS. Should I manually install perl 5.10? Or is this likely to end up making my server a mess? Or should I try to rebuild packages based on Fedora source packages?

chronoz
  • 61
  • 1
  • 2
  • 1
    Check out App:perlbrew, as mentioned here: http://stackoverflow.com/questions/4764025/how-to-specify-which-version-of-perl-to-use-on-centos – grojo May 12 '11 at 13:41

3 Answers3

5

The "Modern" way of setting up a version of Perl different from the system Perl is by using
perlbrew - this way you can maintain a Perl version on a per-user basis without messing too much with the system installed perl; this way system installed stuff that uses Perl still works without problems.

MichielB
  • 591
  • 2
  • 6
  • or [cpanminus](http://stackoverflow.com/questions/5861292/which-cpan-installer-is-the-right-one-cpan-pm-cpanplus-cpanminus) – chicks Sep 09 '15 at 01:49
  • cpanminus is a -very nice - client for installing perl MODULES from the cpan. If you want a different perl from system perl you can't use a cpan client; you'd use perlbrew or - newer and also very nice - [plenv](https://github.com/tokuhirom/plenv) – MichielB Sep 09 '15 at 11:16
4

The RPMs at https://packages.endpoint.com/rhel/5/os/ look good. They install perl in /usr/local.

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
3

Something like this should work:

wget http://www.cpan.org/src/perl-5.12.3.tar.gz
tar -xzf perl-5.12.3.tar.gz
cd perl-5.12.3
./Configure -des -Dprefix=$HOME/localperl
make
make test
make install

Then you can run the scripts with /usr/bin/perl5.12.3

Bart De Vos
  • 17,911
  • 6
  • 63
  • 82