[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


upgrade PERL

Posted on 2005-05-15
Medium Priority
Last Modified: 2013-12-27
Hi all,
I just upgrade PERL from 5.005 to 5.82 on sparc solaris 8.
I download the PERL from www.sunfreeware.com and use this 2 command for
 i) gunzip -d perl....gz
 ii) pkgadd -d perl....

the installation succeed, but when i reboot and check the current perl using perl -V and perl -v,
it still using the perl 5.005 instead of the new perl.
 the old perl is at /usr/bin/perl
and the new one at /usr/local/bin/perl

my question is..
what/where should i change to change to new perl

Question by:spreq
  • 2
LVL 13

Expert Comment

ID: 14008027
You can either set your PATH environment variable to check /usr/local/bin first like this:

export PATH=/usr/local/bin:$PATH

(You may want to add that to your profile)

Or you can create an alias that points to the new Perl:

alias perl='/usr/local/bin/perl'

(Also may go in your .profile (Or system wide /etc/profile)
LVL 38

Accepted Solution

yuzh earned 100 total points
ID: 14008028
>>what/where should i change to change to new perl

if you want to use the new old for script, make the filrst line of the script looks

#!/usr/local/bin/perl -w

If you want to run perl command in the commandline, you can use full path,

make an alias for perl to use /usr/local/bin/perl
set PATH to make sure search /usr/local/bin before /bin and /usr/bin,
export PATH
LVL 34

Expert Comment

ID: 14011630
Do NOT damage/destroy the old Perl!!!!!!!!!!!!
LVL 34

Assisted Solution

PsiCop earned 100 total points
ID: 14011647
There are automated system routines in Solaris 8 that depend on the old Perl. Fortunately, they are hardcoded to the the /usr/bin/perl5 path.

Compile and install the newer Perl normally, then unlink the /usr/bin/perl (which is just a link to executable in the original install) and link to your new one.

But do NOT otherwise tamper with or damage the existing Perl install.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question