• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 669
  • Last Modified:

Install parallel Perl on Debian

Hello
I installing perl5.8.1 in my box "Debian woody, 2.4.21".
since debian has it's perl-dist-package 5.6.1, I followed the instruction on to install 5.8.1 as well. http://perlmonks.thepen.com/285799.html

username@domain:~$wget http://cpan.org/src/stable.tar.gz
username@domain:~$tar -zxvf stable.tar.gz
username@:~$cd perl-5.8.1
username@domain:~/perl-5.8.1$rm -f config.sh Policy.sh
username@domain:~/perl-5.8.1$sh Configure -de
username@domain:~/perl-5.8.1$make
username@domain:~/perl-5.8.1$make test
username@domain:~/perl-5.8.1$make install


4.confirm new Perl 5.8.0 is user Perl
$perl -e 'print "$]\n";' #should tell you "5.008".
it shows 5.006

rm -f /usr/bin/perl
ln -sf /usr/local/bin/perl /usr/bin/perl

$perl -e 'print "$]\n";'
$bash: -e: command not found

my question, why the last command not showing 5.008

did I install the file in the correct place or should have been installed in a different place?
username@domain:/usr/local$ and not username@domain:~$

current look

$/bin/su
# rm -f /usr/bin/perl
# ln -sf /usr/local/bin/perl /usr/bin/perl
# perl -e 'print "$]\n";'
bash: perl: command not found
# perl -e 'print "$]\n";'
bash: perl: command not found
#

domain:/usr/bin# ls -l | grep perl
-rwxr-xr-x    1 root     root        22903 Aug 10 11:18 find2perl
lrwxrwxrwx    1 root     root           19 Nov 10 07:48 perl -> /usr/local/bin/perl
-rwxr-xr-x    2 root     root       774947 Aug 10 11:19 perl-5.6
-rwxr-xr-x    2 root     root       774947 Aug 10 11:19 perl5.6.1
-rwxr-xr-x    1 root     root        35465 Aug 10 11:18 perlbug
-rwxr-xr-x    1 root     root        16920 Aug 10 11:18 perlcc
-rwxr-xr-x    1 root     root        22696 Aug 10 11:18 perldoc
-rwxr-xr-x    1 root     root          121 Aug 10 11:19 perldoc.stub
domain:/usr/bin# ls -l /usr/local/bin/ | grep perl
lrwxrwxrwx    1 root     staff           9 Nov 10 07:57 perl -> perl5.8.0
domain:/usr/bin#C-d
username@domain:~$ls -l | grep perl
drwxr-xr-x   32 username    username        8192 Nov  7 20:12 perl-5.8.1
username@demain:~$



thanks
0
samj
Asked:
samj
1 Solution
 
jmcgOwnerCommented:
Something's certainly not quite right. Most of your steps seem okay, but it seems curious that you have a link named /usr/local/bin/perl pointing to perl5.8.0 -- if what you were installing was perl5.8.1.

The step

sh Configure -de

causes the configure script to accept the default answer to every question. This is the place where I suspect things went wrong.

For now, I suggest that you locate the Perl executable that should be in the perl-5.8.1 directory as a result of your compilation. Copy that file to /usr/local/bin/perl.5.8.1. Then do

rm /usr/local/bin/perl;
ln -s perl5.8.1 /usr/local/bin/perl

If you cannot find the new perl5.8.1 executable, I recommend that you first put back the symlink pointing to your perl5.6.1:

rm /usr/bin/perl;
ln -s perl5.6.1 /usr/bin/perl


==============

Once you have things stabilized, you can go back to your perl-5.8.1 directory and start over, but leave out the -de

sh Configure

This time, pay attention to what its asking and make sure you like the default answer before saying "yes".

0
 
rootkiddyCommented:
Ok.  I believe I see your problem.  Below is the section I'm looking at.  With comments beside each part.  Basically it looks like your removed the link in /usr/bin/perl and linked it to /usr/local/bin/perl.  In return /usr/local/bin/perl is linked to /usr/local/bin/perl5.8.0 which doesn't exist.  What you probably meant to do was link to the home directory of the user account that you installed perl in.  Or you may have meant to do the make install as root and installed it within another location other than that users home directory.  Also just to make sure you are aware that when you just type perl in will use the first instance of perl found within your path.  You can double check that by running "echo $PATH" or "env" from the commandline.  Note that you can also check whether the above was correct by running /usr/local/bin/perl5.8.0 and see what you get.  Good luck and let me know if this helps.

$/bin/su
# rm -f /usr/bin/perl
# ln -sf /usr/local/bin/perl /usr/bin/perl
# perl -e 'print "$]\n";'
bash: perl: command not found
# perl -e 'print "$]\n";'                    # Comment: You linked to something that doesn't exist.  Below is more information.
bash: perl: command not found
#

domain:/usr/bin# ls -l | grep perl
-rwxr-xr-x    1 root     root        22903 Aug 10 11:18 find2perl
lrwxrwxrwx    1 root     root           19 Nov 10 07:48 perl -> /usr/local/bin/perl
-rwxr-xr-x    2 root     root       774947 Aug 10 11:19 perl-5.6
-rwxr-xr-x    2 root     root       774947 Aug 10 11:19 perl5.6.1
-rwxr-xr-x    1 root     root        35465 Aug 10 11:18 perlbug
-rwxr-xr-x    1 root     root        16920 Aug 10 11:18 perlcc
-rwxr-xr-x    1 root     root        22696 Aug 10 11:18 perldoc
-rwxr-xr-x    1 root     root          121 Aug 10 11:19 perldoc.stub
domain:/usr/bin# ls -l /usr/local/bin/ | grep perl
lrwxrwxrwx    1 root     staff           9 Nov 10 07:57 perl -> perl5.8.0          # Comment: perl5.8.0 is not in the current dir
domain:/usr/bin#C-d
username@domain:~$ls -l | grep perl
drwxr-xr-x   32 username    username        8192 Nov  7 20:12 perl-5.8.1   # Comment: This appears to be in your home directory
username@demain:~$
0
 
samjAuthor Commented:
username@box:~/perl-5.8.1$ ls -l | grep perl
some of the files not all are posted
-rwxr-xr-x    1 username    username        3180 Nov  7 19:57 makeaperl
-r-xr-xr-x    1 username    username        3909 Sep  2 23:41 makeaperl.SH
-rwxr-xr-x    1 username    username      897279 Nov  7 20:00 miniperl
-r--r--r--    1 username    username        2850 Sep  2 23:41 miniperlmain.c
-rw-r--r--    1 username    username        1524 Nov  7 19:58 miniperlmain.o
-rwxr-xr-x    1 username    username      978123 Nov  7 20:00 perl
-r--r--r--    1 username    username      115587 Sep 12 07:42 perl.c
-r--r--r--    1 username    username      128491 Sep 25 06:50 perl.h
-rw-r--r--    1 username    username       61920 Nov  7 19:58 perl.o
-rw-r--r--    1 username    username        1674 Sep 25 21:06

username@box:~/perl-5.8.1$
$cp /perl-5.8.1/perl /usr/local/bin/perl.5.8.1
$rm /usr/local/bin/perl
$ln -s perl5.8.1 /usr/local/bin/perl
$ perl prog/play.pl
bash: /usr/bin/perl: No such file or directory
$ /bin/su
Password:
~# rm /usr/bin/perl
~# ln -s perl5.6.1 /usr/bin/perl
$ /usr/bin/perl5.6.1
print 1;
1:~$
$cd perl-5.8.1
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
samjAuthor Commented:
please concate this to the previous post.
$rm -f config.sh Policy.sh
$sh Configure
...whole bunch of questions
Directories to use for library searches? [/usr/local/lib /lib /usr/lib] /usr/local/lib
Installation prefix to use? (~name ok) [/usr/local]

.$make
...whole bunch of lines
libperl.a(pp.o): In function `Perl_pp_pow':
pp.o(.text+0x1e22): undefined reference to `pow'
libperl.a(pp.o): In function `Perl_pp_sin':
pp.o(.text+0x5b08): undefined reference to `sin'
libperl.a(pp.o): In function `Perl_pp_cos':
pp.o(.text+0x5c0c): undefined reference to `cos'
libperl.a(pp.o): In function `Perl_pp_exp':
pp.o(.text+0x5e0c): undefined reference to `exp'
libperl.a(pp.o): In function `Perl_pp_log':
pp.o(.text+0x5f4d): undefined reference to `log'
libperl.a(pp.o): In function `Perl_pp_sqrt':
pp.o(.text+0x60a3): undefined reference to `sqrt'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
:~/perl-5.8.1$

should I go with
$make test
$make install

what about this Error 1 thing?

thanks
0
 
jmcgOwnerCommented:
No, to try to proceed from that point will be futile. You need to correct the problem in the first make.
Unfortunately, I don't see, from the bit of the transcript that you posted, what the error is. Something went wrong in specifying the math library, perhaps?

0
 
samjAuthor Commented:
how do I fix that?
0
 
jmcgOwnerCommented:
I'm afraid fixing it involves spotting the place in the "Configure" conversation where the math library is being selected and selecting the "right" choice instead of whatever happened last time. I don't know for that particular Linux distribution whether you want "-lm" or some other flag to be given to the loader, so that the entry points into the math library will be properly resolved.

Someone who knows the Debian package system better than me could probably point you to a 5.8.1 that's already built -- but I don't know where to send you for that.
0
 
samjAuthor Commented:
ok.
problem fix.. thanks to all the comments

reboot, login as root into a kde, open a console window
# cd /home/username
# tar -zxvf stable.tar.gz #previously optained with wget http://cpan.org/src/stable.tar.gz
# cd perl-5.8.1
# sh Configure -de
# make
# make test
# make install


# ln -sf perl5.6.1 /usr/bin/perl
# ln -sf perl5.8.1 /usr/local/bin/perl
# /usr/bin/perl -v

This is perl, v5.6.1 built for i686-linux
<snip>

# /usr/local/bin/perl -v

This is perl, v5.8.1 built for i686-linux
<snip>

0
 
jmcgOwnerCommented:
Sorry for all the diversions along the way.

Just a "redo" solved it?

The last two ln commands are things that the "make install" step should have handled in a normal setup, but here, where you explictly want two different versions of perl installed, your approach looks to be as good as any.
0
 
jmcgOwnerCommented:
No objection whatsoever.
0
 
Computer101Commented:
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now