Redhat Linux 5.2 Install Perl

In Redhat Linux 5.2 how can I install Perl? I am not the best at Linux so please bare with me.
LVL 21
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Redhat always comes with Perl already installed.

Try "which perl" and "perl -v".
compdigit44Author Commented:
I typed perl -v and got back that 5.00_04 is installed. I am trying to installed Vmtools and get the error Can't locate in /usr/lib/perl5/i386-linux/5.00_04 ......

Maybe my perl version needs to be upgraded? If so how can I do this?

On you RHEL 5.2 media shall be file with extension *.rpm

you can install it using them, if you have configured yum them this will be the easiest way

to install

rpm -ivh file.rpm

with YUM:

yum install perl

Also one other option will be set ur RHEL media as yum local repository


1. mount the media ( dvd ) example
mount /dev/hdc /media

2. on this path /etc/yum.repos.d/ create a repository

example dvd.repo

vi dvd.repo
Set the following line on that file:
name=DVD for RHEL5.2

try list perl

yum list |grep perl

copy the name it will list

them yum -y install perlname

This way it will install also the prerequisites rpm that perl needs

i hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Also one basic step

before try to install perl

check if is alreasy installed

rpm -qa|grep -i perl

if u get something like

perl-5.XXX -- > perl version

then you have it
As root:

yum update perl

If this fails due to lots of missing dependencies you will have to upgrade the OS.
compdigit44Author Commented:
After I type in su -

I type in    yum update perl  and get bash: yum command not found
compdigit44Author Commented:
also I am not sure if this a problem or not but my / directory is 250MB and is showing 100% full yet my home and usr directory are fine at 9.5GB
/ should never become that full. Please clean up!
Seth SimmonsSr. Systems AdministratorCommented:
forget clean up; reinstall it
seems there are multiple issues and missing files, probably from your seemingly underprovisioned root partition
also, 5.2 is long out of support; 5.11 is the latest
compdigit44Author Commented:
I will try to rebuild..

How can I specify my /root size during install
Seth SimmonsSr. Systems AdministratorCommented:
you can do it if you select custom partitioning
compdigit44Author Commented:
How can i use disk drug to properly partiion my drive
Seth SimmonsSr. Systems AdministratorCommented:
depends how you want it
you mentioned before you had a separate /home and /usr directories - you want to keep it that way or just have 1 large root partition?
if you want it one large partition, i would first create a swap partition of 4gb (as an example; not sure how much memory or disk space there is but shouldn't need a large one anyway) and do / for remaining free space
compdigit44Author Commented:
some how I figured in out..

I created a 8GB root
6GB home
2GB tmp
100mb swap
compdigit44Author Commented:
OK I finished re-installing and now have ample free space I tried to install Vmtools again and got the same Can't locate error again
Seth SimmonsSr. Systems AdministratorCommented:
yum groupinstall "Development Tools" "Development Libraries"

then try vmware tools again
compdigit44Author Commented:
same error
bash: yum command not found
Seth SimmonsSr. Systems AdministratorCommented:
what install options did you select?
compdigit44Author Commented:
Ok I am trying to reinstall peral.. and mount my install CD where can i find the rpm installs for peral .. yum etc

Also could a more updated version of perl be downloaded to run on Redhat 5.2. Also I need to run this version since one our apps still runs on this version..
compdigit44Author Commented:
I manage to reinstall perl for the CD but got the same error when trying to install VM tools again. I believe this has to do with the fact the Perl verison is so old.

I downloaded perl- and install it but when I type in perl -v it still shows 5.00..

Maybe I did not down the correct one for Redhat??

Seth SimmonsSr. Systems AdministratorCommented:
which perl

what does it return?
compdigit44Author Commented:
I downloaded another copy of perl from

I run rpm -ivh perl*

I get a bunch of #### on two line then returns to a command prompt
when I type in perl -v 5.00 is still listed
Seth SimmonsSr. Systems AdministratorCommented:
what happens when you do which perl ?
compdigit44Author Commented:
I get /usr/bin/perl
Seth SimmonsSr. Systems AdministratorCommented:
the perl version with RHEL 5.2 is 5.8.8
on your media where you installed the package, what does ls perl* look like?
compdigit44Author Commented:
THe version of perl I tried to install was the one in the following link so I am guess it is 5.8 since this is the only RPM on the ISO I created.

Should I try another download? Can you recommend one..
Seth SimmonsSr. Systems AdministratorCommented:
use the rpm on the installation media
compdigit44Author Commented:
I tried that same result...
still shows 5.00 when I run perl -v
Seth SimmonsSr. Systems AdministratorCommented:
what does cat /etc/redhat-release show?
Hi take a look the rpm u installed:
THe version of perl I tried to install was the one in the following link

perl-5.8.8-41.el5.src --- > mean you installed only the source not the package

this is why if you run perl -v youn still see the old version

the package you need to install need to be similar but without the src

my guess is if you try to install newer perl version then some other package that depends of the perl will need to be update too

be aware of that..

compdigit44Author Commented:
ON the site below I am not seeing the 5.8.8 Perl DOwnload for 32bit REdhat Linux with out the SRC as you listed
compdigit44Author Commented:
If some could send me a link of the latest version of perl Redhat 5.2 32 bit can handle I would be very grateful...

Do you have account at RHN ( Red Hat Network)?

compdigit44Author Commented:
I created an account but do not have a subscription
compdigit44Author Commented:
I tried going back to the

and downloaded the binaries and source for the latest version of per yet when I tried to install Active Perl using

it faiils stating it wasn't able to read the first line...

Any advice... I am grateful for everyone help
compdigit44Author Commented:
I downloaded perl.5.12.5 extracted it and see and when I try to run this I get..... bash ./ Permission Denied

There is also a installhtml file
compdigit44Author Commented:
Does anyone have any thoughts on this ... Sorry if this is a simple problem but it big for me since I am not very good in Linux
Jan SpringerCommented:
This is your error:

  "Can't locate in /usr/lib/perl5/i386-linux/5.00_04 ......"

Have you tried a "cpan install warnings" ?
compdigit44Author Commented:
no I have not... is that the exact command I should type.. Also why is yum not installed on a base install of redhat 5.2
Jan SpringerCommented:
if it's RedHat as opposed to CentOS (or Fedora), it uses "rpm" for installations and updates.

And, yes, I believe that's the exact syntax.  If cpan doesn't find it, you should be able to download and put it within the perl subdirectory.
compdigit44Author Commented:
OK I will try it within the hour and let you know,,,,

thanks again
compdigit44Author Commented:
I get... bash:  cpan command not found
Jan SpringerCommented:
You should be to install from RH using RPM.

If not:

There is a download button partway down the page on the left.
compdigit44Author Commented:
I see it is a tar.gz how do I install it.
Jan SpringerCommented:
This will decompress and open the archive:

tar -zxfs CPAN-2.05.tar.gz

If you run into a problem decompressing using tar, then:

gzip -d CPAN-2.05.tar.gz
tar xvfs CPAN-2.05.tar


cd CPAN-2.05
chmod 755 Makefile.PL

You should just be able to "./Makefile.PL" (no quotes)
compdigit44Author Commented:
WHen I type in....    ./Makefile.PL aI get Unrecongized switch -*- cperl -h will show valid options
compdigit44Author Commented:
WHern I type in perl Makefile.PL I get can't locate File/ in @INC..

I believe my whole perl install in message up or so old it cannot handle anything...

Can someone point me to a download for the RPM verision of Perl which can run on Redhat 5.2 32 bit
compdigit44Author Commented:
PLease note when I did the inital install I one did the base install using the first CD that's it..
Jan SpringerCommented:
You can get the whole perl installation from, as well.
compdigit44Author Commented:
Ok,.... but my problem is that I do not know what do download or how to install it from a tar.gz :-(
Jan SpringerCommented:
The same:

gzip -d <filename>.tar.gz
tar xvfs <filename>.tar
cd <filename>

Compiled programs are usually:

  ./configure; make; make test; make install

And there should be a README or INSTALL document.

I'll download it a bit later and get the directions for you.
Jan SpringerCommented:
login as a regular non-privileged (meaning not root) account:

tar zxfs perl-5.20.1.tar.gz
cd perl-5.20.1
sh Configure -de
make test
sudo make install

Instead of "sudo make install", you can do "su -; make install".  With the point being, don't compile as root although you have to be root to install it.
compdigit44Author Commented:
my Linux server does not have network / internet access
Jan SpringerCommented:
Put the CDs back in and install everything *perl*.
compdigit44Author Commented:
OK... I the file I download is for ActivePerl.

When I type in sh Configure -de I get a no file or directory

Please see screen shot..
Jan SpringerCommented:
you need to install all of your libraries but particularly glibc.
compdigit44Author Commented:
how can I do this?
Jan SpringerCommented:
It's been too long since I've had to do this but, iirc, you just mount the CD/DVD into the drive, find the package and:

cd /path/to/cd/drive
rpm -ivh <package>

So, you should be able to:

rpm -ivh gcc

After you've found the file on the disk.
compdigit44Author Commented:
Did I do something wrong durning the install to cause these packages to be missing? If so would I be better off reinstalling
Jan SpringerCommented:
Not necessarily.  I believe the compiler is under "development" which you might not have thought to install.

I usually install most development and libraries.  Saves headaches down the road.
compdigit44Author Commented:
I reinstalled Redhat 5.2 and made sure I selected the "Development Tools" problem is I am having the same problems cpan still missing and getting the same missing...

How can I make sure the Dev Tools were installed
Jan SpringerCommented:
Was there a drop down box that you can select or deselect packages within DevTools?  

It's possible that not all of them were installed.
compdigit44Author Commented:
I installed items like EMACs, C++  and Dev Tools and selected the option below to install individual packages when I typed in which cpan nothing was returned and got the same missing when installing VM tools

this is my third reinstall
Jan SpringerCommented:
Did you ever run a find to see if it was in a non-default location?

sudo find / -name

Even as old as 5.2 is, I would think that module would be on the install disk.
compdigit44Author Commented:
Nothing is returned... When I hit enter the screen pauses for a couple of seconds then returns to a command prompt..

Did I mess up the install????
Jan SpringerCommented:
I don't think so.  If this is a new installation and you don't have a RedHat contract, can you not install CentOS 6.0 and yum update it to 6.6?
compdigit44Author Commented:
stupid question so I am stuck and this cannot be fixed??
Jan SpringerCommented:
I don't know.  I haven't done a 5.x install for 5 or 6 years.
compdigit44Author Commented:
still no luck with anything  I reinstalled Redhat 5.2 installing everything and stil get the can't find when trying to install any version of VMtools

I am open to any suggetions
Jan SpringerCommented:
copy to a usb drive.

insert the usb drive into the RH server (it should auto mount)

cd /path/to/usb drive
cp warnings-compat.0.07.tar.gz /some/directory/on/the/server
cd /some/directory/on/the/server
tar zxfs warnings-compat-0.07.tar.gz
cd warnings-compat-0.07
perl Makefile.PL
make test
make install
compdigit44Author Commented:
Here is what I got when I did as you advised..

1) When I typed in perl Makefile.PL (Warning: prerequisite Test:: More ) not found at (eval)

2) When I type in make test  I get "undefined subroutine &test  called at /usr/lib/perl/Test/

3) When I try to install VMtools again I get... Bareword "qr" not allowed while "strict subs" in use at ./ line
Jan SpringerCommented:
you are to putting the DVD in the drive and doing a command line search for what you need.

for what you are doing, this machine needs to be put on line so that you can properly install apps with dependencies.
compdigit44Author Commented:
I downloaded the file as mentioned. Then used Folder2ISO and mount the ISO to my VM..

Also I am not able to get network access to the VM. In Vmware workstation 10 it will not reconize the NIC which is probably because Vmtools is not installed... catch-22
compdigit44Author Commented:
Well I found on my problem .. .I download an really old copy of Redhat Linux 5.2 which is from 1998. The copy I needed and thought I download needed to be REdhat Linux Enterprise 5.2 or 5.4 32 Bit.

Everyone thank you so much for your help and support...
compdigit44Author Commented:
All suggestion probably would have worked if I have downloaded the write version which I was told is only available through a paid subscription.
Jan SpringerCommented:
well, heck.  i could have told you that.

your best best is to get rid of rh 5.anything and install CentOS 6.  it is RHEL in the free version generally distributed about two months after its RH twin.
compdigit44Author Commented:
I know but the custom appliance we have run on Redhat Enterprise 5.4 and I need to create a test VM to try so changes in our lab

I even though about trying to find a free versin of Linux that is running the same kernal version of Redhat Enterprise 5.2 or 5.4

thanks again for all of your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.