Upgrade Perl version on Solaris machine


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Upgrade Perl version on Solaris machine
# 1  
Old 05-23-2013
Upgrade Perl version on Solaris machine

Hi,

Can you please assist in upgrading perl from 5.8.x to 5.10?

Right now i am running the below verison on my Solaris SPARC machine.

Quote:
perl -v

This is perl, v5.8.4 built for sun4-solaris-64int
(with 35 registered patches, see perl -V for more detail)

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at Perl.com, the Perl Home Page.
Thanks in advance
# 2  
Old 05-23-2013
My suggestion: Install perl 5.10 in a different location and use 5.10's binary for your perl programs. And in any case, DO NOT remove existing perl installation. Lot of unix packages rely heavily on the existing version of perl and to remove perl would mean damage to your unix installation. (I had to learn it the hard way).

Also, through the CPAN shell, you can use the upgradecommand. Not sure how it works. I usually download the tarball and make it myself.

Last edited by balajesuri; 05-23-2013 at 01:17 PM..
# 3  
Old 05-23-2013
Thank you for your reply, But how can i point all the modules to use the latest binary?
# 4  
Old 05-23-2013
Let's say you have installed perl 5.10 in /path/to/perl510 and the perl binary is /path/to/perl510/bin/perl

Your existing perl would be /usr/bin/perl right?

So you may mv /usr/bin/perl /usr/bin/perl58 and then ln -s /path/to/perl510/bin/perl /usr/bin/perl

That way you wouldn't have to edit any of your existing perl programs. And all your modules would point to the new perl binary.
These 2 Users Gave Thanks to balajesuri For This Post:
# 5  
Old 05-28-2013
Thank you for the response.

I am trying to Install perl (5.10.1) on Solaris machine and issued the command (i.e)
Quote:
sh Configure -Dcc='gcc -B/usr/ccs/bin/' -Dprefix=/usr/perl5/5.10.1/bin/perl -des
Below is the output for configure

Quote:
First let's make sure your kit is complete. Checking...
Would you like to see the instructions? [n]
Locating common programs...
Checking compatibility between /bin/echo and builtin echo (if any)...
Symbolic links are supported.
Checking how to test for symbolic links...
You can test for symbolic links with 'test -h'.
Good, your tr supports [:lower:] and [:upper:] to convert case.
Using [:upper:] and [:lower:] to convert case.
3b1 dos_djgpp irix_6 next_3_0 solaris_2
aix dragonfly irix_6_0 next_4 stellar
aix_3 dynix irix_6_1 nonstopux sunos_4_0
aix_4 dynixptx isc openbsd sunos_4_1
altos486 epix isc_2 opus super-ux
amigaos esix4 linux os2 svr4
apollo fps lynxos os390 svr5
atheos freebsd machten os400 ti1500
aux_3 genix machten_2 posix-bc titanos
beos gnu midnightbsd powerux ultrix_4
bsdos gnukfreebsd mint qnx umips
catamount gnuknetbsd mips rhapsody unicos
convexos greenhills mirbsd riscos unicosmk
cxux haiku mpc sco unisysdynix
cygwin hpux mpeix sco_2_3_0 utekv
darwin i386 ncr_tower sco_2_3_1 uts
dcosx interix netbsd sco_2_3_2 uwin
dec_osf irix_4 newsos4 sco_2_3_3 vmesa
dgux irix_5 next_3 sco_2_3_4 vos
Which of these apply, if any? [solaris_2]
Operating system name? [solaris]
Operating system version? [2.10]
Installation prefix to use? (~name ok) [/usr/perl5/5.10.1/bin/perl]
Directory /usr/perl5/5.10.1/bin/perl doesn't exist. Use that name anyway?
[y]
AFS does not seem to be running...
What installation prefix should I use for installing files? (~name ok)
[/usr/perl5/5.10.1/bin/perl]
Directory /usr/perl5/5.10.1/bin/perl doesn't exist. Use that name anyway?
[y]
Build Perl for SOCKS? [n]
Use the PerlIO abstraction layer? [y]
Getting the current patchlevel...
Build a threading Perl? [n]
Build Perl for multiplicity? [n]
Use which C compiler? [gcc -B/usr/ccs/bin/]
Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
Directories to use for library searches?
[/usr/local/lib /usr/lib /usr/ccs/lib]
What is the file extension used for shared libraries? [so]
Try to use long doubles if available? [n]
Checking for optional libraries...
What libraries to use? [-lsocket -lnsl -lgdbm -ldl -lm -lc]
What optimizer/debugger flag should be used? [-O]
Any additional cc flags? [-fno-strict-aliasing -pipe -I/usr/local/include]
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)? [ -L/usr/local/lib]
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

gcc -B/usr/ccs/bin/ -o try -O -fno-strict-aliasing -pipe -I/usr/local/include -L/usr/local/lib try.c -lsocket -lnsl -lgdbm -ldl -lm -lc
./try

and I got the following output:

ld.so.1: try: fatal: libgdbm.so.3: open failed: No such file or directory
Killed
The program compiled OK, but exited with status 137.
You have a problem. Shall I abort Configure [y]
Ok. Stopping Configure.

Please assist.
# 6  
Old 05-28-2013
See if file(libgdbm.so.3) exists on your machine:
Code:
> find / -name "libgdbm.so.3" 2>/dev/null

Also, just curious, why not install latest stable version?

I recently downloaded(5.16.3, latest stable version is 5.18.0) and created a 'relocatable' perl installation on a "Solaris" box,
so after testing I got a SA that has access to 'root' to move the perl installation to "/opt/perl" and just create a link to
build this way the 'system' perl installations are not touched.


Code:
### Log of download and configure for perl(5.16.3) build for Solaris
cd /export/home/me/perl
> wget http://www.cpan.org/src/5.0/perl-5.16.3.tar.gz
Connecting to www.cpan.org|207.171.7.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16930885 (16M) [application/octet-stream]
Saving to: `perl-5.16.3.tar.gz'

100%[======================================>] 16,930,885   520K/s   in 32s

-- perl-5.16.3.tar.gz' saved [16930885/16930885]

> gzip -dv perl-5.16.3.tar.gz
perl-5.16.3.tar.gz:       77.3% -- replaced with perl-5.16.3.tar

> tar -xf perl-5.16.3.tar
> cd perl-5.16.3
> sh Configure -des -Dcc=cc -Duse64bitall -Dusethreads -Dloclibpth="/opt/csw/lib/sparcv9" -Duserelocatableinc -Dprefix=/export/home/me/test/perl

# 7  
Old 05-28-2013
Thank you for your reply. I dont understand
Quote:
Dloclibpth="/opt/csw/lib/sparcv9
So after installing this we will have to create a symbolic link for the newly installed version in the new location?

---------- Post updated at 03:42 PM ---------- Previous update was at 03:39 PM ----------

Btw i can find the file (i.e)
Quote:
find / -name "libgdbm.so.3" 2>/dev/null
/usr/local/lib/libgdbm.so.3
---------- Post updated at 03:48 PM ---------- Previous update was at 03:42 PM ----------

Btw when used the command (i.e)
Quote:
sh Configure -des -Dcc=cc -Duse64bitall -Dusethreads -Dloclibpth="/opt/csw/lib/sparcv9" -Duserelocatableinc -Dprefix=/usr/perl5/5.16.3/bin/perl
got the below output.

Quote:
First let's make sure your kit is complete. Checking...
Locating common programs...
Checking compatibility between /bin/echo and builtin echo (if any)...
Symbolic links are supported.
Checking how to test for symbolic links...
You can test for symbolic links with 'test -h'.
Good, your tr supports [:lower:] and [:upper:] to convert case.
Using [:upper:] and [:lower:] to convert case.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS vendor,
or for a free C compiler try GCC, the GNU Compiler Collection - GNU Project - Free Software Foundation (FSF)
I cannot continue any further, aborting.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. AIX

Upgrade the machine

Hi, I am asked to build or upgrade an AIX server by looking at one of the other servers. So they gave me 2 servers. One to build (A) and another to take the reference from (B). So the servers have the following configs. Server A Processor Type: PowerPC_POWER5 Processor... (2 Replies)
Discussion started by: svajhala
2 Replies

2. Solaris

Upgrade java version on solaris 10 SPARC

Hi Friends, I am trying to upgrade my java version on solaris sparc machine. I have installed the o/s software from scratch and it came with some default java version. I want to install the newer version of java available on top of this machine. I have already installed the latest version in... (7 Replies)
Discussion started by: prash358
7 Replies

3. Solaris

Upgrade Apache to new version? Solaris 10, goal:PHP

Hello, I have been searching on unix.com and google in general. I can't find what I am looking for. Maybe too dumb of a question. I've downloaded and installed the sunfreeware package for PHP 5.3.6 and made sure all dependencies are satisfied. Apache 2.2.8 is currently installed and... (2 Replies)
Discussion started by: CSLibrary
2 Replies

4. Solaris

is there an veritas volume manager version compatible with solaris x86 machine?

i heard some where veritas volume manager wont work on solaris x86. i have installed vmware into my 32bit xp machine. i am planning to learn veritas.. is there an veritas volume manager version compatible with solaris x86 machine? (2 Replies)
Discussion started by: chidori
2 Replies

5. Solaris

upgrade solaris mysql version...

hi i need to upgrade my solaris mysql version.. can u guide me the upgrade steps.. my current version is 4.0.31-log i need to upgrade to 5.0 .. thanks.. ---------- Post updated at 12:04 PM ---------- Previous update was at 11:28 AM ---------- my solaris version is 10.. ----------... (2 Replies)
Discussion started by: senkerth
2 Replies

6. Solaris

how to upgrade bash's version ?

Dear all, How to upgrade bash's version? which way should be easy between remove the old version first and upgrade it or upgrade without remove? Please, tell me how to upgrade step by step because I'm newbie thank in advance (4 Replies)
Discussion started by: unitipon
4 Replies

7. Shell Programming and Scripting

Login to a remote solaris machine as superuser through perl

I am trying to write a perl script that will do remote machine. I have done user loging using simple command; $telnet->login('test', 'test123'); But now I want to do root login or superuser login. So I tried the superuser command, $telnet->cmd("su"); But I am not able to send the... (0 Replies)
Discussion started by: james2
0 Replies
Login or Register to Ask a Question