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.
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
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 upgrade
command. Not sure how it works. I usually download the tarball and make
it myself.
Thank you for your reply, But how can i point all the modules to use the latest binary?
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.
1 Like
Thank you for the response.
I am trying to Install perl (5.10.1) on Solaris machine and issued the command (i.e)
Below is the output for configure
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.
See if file(libgdbm.so.3) exists on your machine:
> 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.
### 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
Thank you for your reply. I dont understand
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)
---------- Post updated at 03:48 PM ---------- Previous update was at 03:42 PM ----------
Btw when used the command (i.e)
got the below output.
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.
I have successfully installed Perl (5.10.1)and have a question in creating symbolic links
user@solaris >which perl
/bin/perl
user@solaris >ls -la /bin/perl
lrwxrwxrwx 1 root root 23 Oct 18 2011 /bin/perl -> ../perl5/5.8.4/bin/perl
user@solaris >ls -la /usr/perl5/
total 22
drwxr-xr-x 8 root bin 512 Jun 4 17:53 .
drwxr-xr-x 45 root sys 1024 Jul 25 2012 ..
drwxr-xr-x 3 root root 512 Jun 4 17:53 5.10.1
drwxr-xr-x 5 root bin 512 Oct 18 2011 5.6.1
drwxr-xr-x 3 root bin 512 Oct 18 2011 5.8.3
drwxr-xr-x 5 root bin 512 Oct 18 2011 5.8.4
lrwxrwxrwx 1 root root 11 Oct 18 2011 bin -> ./5.8.4/bin
lrwxrwxrwx 1 root root 9 Oct 18 2011 man -> 5.8.4/man
lrwxrwxrwx 1 root root 15 Oct 18 2011 pod -> ./5.8.4/lib/pod
drwxr-xr-x 4 root bin 512 Oct 18 2011 site_perl
drwxr-xr-x 5 root bin 512 Oct 18 2011 vendor_perl
So what needs to be done for creating symbolic link to point perl to newer version (i.e) 5.10.1?
A little over kill but it's good info and you can get what you need from it:
Mulitple Perl Installations