Solved

Redhat Linux 5.2 Install Perl

Posted on 2014-12-01
78
309 Views
Last Modified: 2014-12-16
In Redhat Linux 5.2 how can I install Perl? I am not the best at Linux so please bare with me.
0
Comment
Question by:compdigit44
  • 42
  • 18
  • 10
  • +2
78 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 40474051
Redhat always comes with Perl already installed.

Try "which perl" and "perl -v".
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474072
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 warnings.pm in /usr/lib/perl5/i386-linux/5.00_04 ......

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

Accepted Solution

by:
Pepe2323 earned 250 total points
ID: 40474076
Hi

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

steps:

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:
[dvd]
name=DVD for RHEL5.2
baseurl=file:///media/Server
gpgcheck=0

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.
0
 
LVL 8

Expert Comment

by:Pepe2323
ID: 40474079
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
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 40474085
As root:

yum update perl

If this fails due to lots of missing dependencies you will have to upgrade the OS.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474094
After I type in su -

I type in    yum update perl  and get bash: yum command not found
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474098
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
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 40474106
/ should never become that full. Please clean up!
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40474137
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
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474182
I will try to rebuild..

How can I specify my /root size during install
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40474190
you can do it if you select custom partitioning
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474249
How can i use disk drug to properly partiion my drive
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40474293
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
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474310
some how I figured in out..

I created a 8GB root
6GB home
2GB tmp
100mb swap
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474499
OK I finished re-installing and now have ample free space I tried to install Vmtools again and got the same Can't locate warning.pm error again
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40474570
yum groupinstall "Development Tools" "Development Libraries"

then try vmware tools again
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474584
same error
bash: yum command not found
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40474613
what install options did you select?
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40474647
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..
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476267
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-5.1.2.3.-11.14.1.src.rpm 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??

Mayb
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40476313
which perl

what does it return?
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476316
I downloaded another copy of perl from
 http://www.rpmseek.com/rpm-dl/perl-5.8.8-41.el5.src.html?hl=com&cx=0:-:0:12511806:0:0:0:

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
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40476387
what happens when you do which perl ?
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476482
I get /usr/bin/perl
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40476497
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?
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476511
THe version of perl I tried to install was the one in the following link  http://www.rpmseek.com/rpm-dl/perl-5.8.8-41.el5.src.html?hl=com&cx=0:-:0:12511806:0:0:0: 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..
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40476551
use the rpm on the installation media
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476560
I tried that same result...
still shows 5.00 when I run perl -v
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40476580
what does cat /etc/redhat-release show?
0
 
LVL 8

Expert Comment

by:Pepe2323
ID: 40476655
Hi take a look the rpm u installed:
THe version of perl I tried to install was the one in the following link  http://www.rpmseek.com/rpm-dl/perl-5.8.8-41.el5.src.html?hl=com&cx=0:-:0:12511806:0:0:0:


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..

Regards.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476751
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

http://www.rpmseek.com/rpm-dl/perl-5.8.8-41.el5.src.html?hl=com&cx=0:-:0:12511806:0:0:0:
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476821
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...
0
 
LVL 8

Expert Comment

by:Pepe2323
ID: 40476846
Hi

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

Regards.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40476967
I created an account but do not have a subscription
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40478622
I tried going back to the www.perl.org/get.html

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

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

Any advice... I am grateful for everyone help
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40478995
I downloaded perl.5.12.5 extracted it and see install_lib.pl and when I try to run this I get..... bash ./install_lib.pl Permission Denied

There is also a installhtml file
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40481026
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
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40482923
This is your error:

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

Have you tried a "cpan install warnings" ?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 19

Author Comment

by:compdigit44
ID: 40482970
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
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40482993
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 warnings.pm and put it within the perl subdirectory.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483129
OK I will try it within the hour and let you know,,,,

thanks again
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483260
I get... bash:  cpan command not found
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40483276
You should be to install from RH using RPM.

If not:

https://metacpan.org/pod/distribution/CPAN/scripts/cpan

There is a download button partway down the page on the left.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483288
I see it is a tar.gz how do I install it.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40483319
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

Then:

cd CPAN-2.05
chmod 755 Makefile.PL

You should just be able to "./Makefile.PL" (no quotes)
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483487
WHen I type in....    ./Makefile.PL aI get Unrecongized switch -*- cperl -h will show valid options
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483576
WHern I type in perl Makefile.PL I get can't locate File/Spec.pm 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
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483600
PLease note when I did the inital install I one did the base install using the first CD that's it..
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40483724
You can get the whole perl installation from cpan.org, as well.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483738
Ok,.... but my problem is that I do not know what do download or how to install it from a tar.gz :-(
0
 
LVL 28

Assisted Solution

by:Jan Springer
Jan Springer earned 250 total points
ID: 40483741
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.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40483871
login as a regular non-privileged (meaning not root) account:

wget https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.20.1.tar.gz
tar zxfs perl-5.20.1.tar.gz
cd perl-5.20.1
sh Configure -de
make
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.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483951
my Linux server does not have network / internet access
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40483958
Put the CDs back in and install everything *perl*.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40483997
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..
screenshot.png
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40484173
you need to install all of your libraries but particularly glibc.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40484672
how can I do this?
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40484681
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.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40484778
Did I do something wrong durning the install to cause these packages to be missing? If so would I be better off reinstalling
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40484783
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.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40484957
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 warnings.pm missing...

How can I make sure the Dev Tools were installed
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40485494
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.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40485875
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 warnings.pm missing when installing VM tools

this is my third reinstall
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40486708
Did you ever run a find to see if it was in a non-default location?

sudo find / -name warnings.pm

Even as old as 5.2 is, I would think that module would be on the install disk.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40487174
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????
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40487187
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?
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40487702
stupid question so I am stuck and this cannot be fixed??
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40487717
I don't know.  I haven't done a 5.x install for 5 or 6 years.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40496634
still no luck with anything  I reinstalled Redhat 5.2 installing everything and stil get the can't find warnings.pm when trying to install any version of VMtools


I am open to any suggetions
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40496667
http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/warnings-compat-0.07.tar.gz
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
make test
make install
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40497347
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/Harness.pm

3) When I try to install VMtools again I get... Bareword "qr" not allowed while "strict subs" in use at ./vmtools.pl line
 1414
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40497914
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.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40498134
I downloaded the warning.pm 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
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40503161
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...
0
 
LVL 19

Author Closing Comment

by:compdigit44
ID: 40503166
All suggestion probably would have worked if I have downloaded the write version which I was told is only available through a paid subscription.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40503178
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.
0
 
LVL 19

Author Comment

by:compdigit44
ID: 40503183
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.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now