R Saravanan
R Saravanan

Reputation: 11

How to set a env for perl 5.36 binary in linux

We have RHEL 8.6 server and the perl is by default installed when we installed the RHEL. PERL version is 5.8.9. we need to install PERL 5.36. so we are trying to install the same. downloaded PERL binary from https://www.perl.org/

we executed

sh <(curl -q https://platform.activestate.com/dl/cli/_pdli01/install.sh)
state activate --default saravraj-org/Perl-5.36.0-Linux-CentOS

Also

sh <(curl -q https://platform.activestate.com/dl/cli/_pdli01/install.sh) \
   -c'state activate --default saravraj-org/Perl-5.36.0-Linux-CentOS'

Now the perl -v command shows the version as 5.36

build@sarav~/Perl-5.36.0-Linux-CentOS ❯❯❯ perl -v | grep 'This is'
This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux

when we execute OpenSSL configure its taking perl 5.8.9 version still so we need to set the env for perl 5.36 version.

could you please provide the setpes for the same.

build@sarav /a/m/p/o/a/ciscossl-1.1.1n.7.2.390 ❯❯❯ perl -v ✘ 1

This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux

Copyright 1987-2022, Larry Wall build@sarav /a/m/p/o/a/ciscossl-1.1.1n.7.2.390 ❯❯❯ ./config --prefix=/auto/open/linux/openssl no-threads no-ecdh no-ec - fPIC Operating system: x86_64-whatever-linux2 Perl v5.10.0 required--this is only v5.8.9, stopped at ./Configure line 12. BEGIN failed--compilation aborted at ./Configure line 12. Perl v5.10.0 required--this is only v5.8.9, stopped at ./Configure line 12. BEGIN failed--compilation aborted at ./Configure line 12. This system (linux-x86_64) is not supported. See file INSTALL for details.

we are expecting the script to take the PERL 5.36 version but it's taking 5.8.9

Upvotes: 1

Views: 497

Answers (1)

Elvin
Elvin

Reputation: 332

You might also use perlbrew for installing and setting the default Perl on your system conveniently.

https://perlbrew.pl/

To install the latest stable release, and use it as default in the current shell and in all future shell sessions.

perlbrew install perl-5.36.0
perlbrew switch perl-5.36.0

Upvotes: 0

Related Questions