LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   CPAN cannot install Math::Pari module (http://www.linuxquestions.org/questions/programming-9/cpan-cannot-install-math-pari-module-812808/)

bluethundr 06-08-2010 01:01 AM

CPAN cannot install Math::Pari module
 
greetings

I wrote a perl script to feed information to our load balancer:

Code:

#!/usr/bin/perl
#
use strict;
#use warnings;
#
#
use Net::SSH::Perl;
my $user="bluethundr";
my $pass="secret";
my $dir="$ENV{HOME}/data";
open (LBVSERVERS), '<', "$dir/lb-vserver" or die "Couldn't open file: $!";
open (CSVSERVERS), '<', "$dir/cs-vserver" or die "Couldn't open file: $!";


my $ssh = Net::SSH::Perl->new("10.50.0.1");
$ssh->login("$user", "$pass");

print "\n\n\n\n\n**********LB VSERVERS**********\n\n\n\n\n"; 
while (my $line = <LBVSERVERS>) {
      chomp $line;
      my ($number,  $lbvserver) = split(/\s+/, $line);
      print "show lb vserver $lbvserver\n";
      $ssh->cmd("show lb vserver $lbvserver");
      chomp(my $ans = <STDIN>);
      print "Ready for next lb vserver? (y/n): ";
      if ($ans=~/y|Y/) {
        next;
      } else {
        chomp(my $done = <STDIN>);
        print "Quit? (y/n): ";
        if($ans=~/y|Y/) {
          last;
        } else {
        next;
        }
      }
       
     
     
print "\n\n\n\n\n**********CS VSERVERS**********\n\n\n\n\n";
while (my $line = <CSVSERVERS>) {
      chomp $line;
      my ($f1,  $f2, $f3, $csvserver) = split(/\s+/, $line);
      print "show cs vserver $csvserver";
      $ssh->cmd("show cs vserver $csvserver");
      print "Ready for next cs vserver? (y/n): ";
      if ($ans=~/y|Y/) {
        next;
      } else {
        chomp(my $done = <STDIN>);
        print "Quit? (y/n): ";
        if($ans=~/y|Y/) {
          last;
        } else {
        next;
        }
      }
 }
}


close  LBVSERVERS;
close  CSVSERVERS;


I need to be able to install the Math::Pari CPAN module in order to accomodate the Net::SSH CPAN module.

The prereqs are installed:

Code:


cpan> install Net::FTP
Net::FTP is up to date.

cpan> install LWP::UserAgent
LWP::UserAgent is up to date.

But when I either try to install or force install Math::Pari this is what I get:

Code:

cpan> install Math::Pari
Running install for module Math::Pari
Running make for I/IL/ILYAZ/modules/Math-Pari-2.01080604.tar.gz
Checksum for /home/bluethundr/.cpan/sources/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080604.tar.gz ok
Math-Pari-2.01080604/
Math-Pari-2.01080604/Changes
Math-Pari-2.01080604/func_codes.h
Math-Pari-2.01080604/INSTALL
Math-Pari-2.01080604/libPARI/
Math-Pari-2.01080604/libPARI/codes_2014
Math-Pari-2.01080604/libPARI/expected_codes
Math-Pari-2.01080604/libPARI/extract_codes.pl
Math-Pari-2.01080604/libPARI/gphelp
Math-Pari-2.01080604/libPARI/Makefile.PL
Math-Pari-2.01080604/Makefile.PL
Math-Pari-2.01080604/MANIFEST
Math-Pari-2.01080604/META.yml
Math-Pari-2.01080604/Pari.pm
Math-Pari-2.01080604/Pari.xs
Math-Pari-2.01080604/PariInit.pm
Math-Pari-2.01080604/patches/
Math-Pari-2.01080604/patches/diff_2.1.2_gccism
Math-Pari-2.01080604/patches/diff_2.1.3_interface
Math-Pari-2.01080604/patches/diff_2.1.4_interface
Math-Pari-2.01080604/patches/diff_2.1.6_align_power_of_2
Math-Pari-2.01080604/patches/diff_2.1.6_no-common
Math-Pari-2.01080604/patches/diff_2.1.6_ploth64
Math-Pari-2.01080604/patches/diff_2.1.7_-O
Math-Pari-2.01080604/patches/diff_2.1.7_div
Math-Pari-2.01080604/patches/diff_2.1.7_mingw-w64
Math-Pari-2.01080604/patches/diff_2.1.7_restart
Math-Pari-2.01080604/patches/diff_2.2.2_interface
Math-Pari-2.01080604/patches/diff_pari-2.1.3-ix86-divl
Math-Pari-2.01080604/patches/patch-pari-unnormalized-float
Math-Pari-2.01080604/README
Math-Pari-2.01080604/t/
Math-Pari-2.01080604/t/000_load-problem.t
Math-Pari-2.01080604/t/00_Pari.t
Math-Pari-2.01080604/t/PlotRect.t
Math-Pari-2.01080604/t/zz_leak.t
Math-Pari-2.01080604/test_eng/
Math-Pari-2.01080604/test_eng/ex.t
Math-Pari-2.01080604/test_eng/Testout.pm
Math-Pari-2.01080604/TODO
Math-Pari-2.01080604/typemap
Math-Pari-2.01080604/utils/
Math-Pari-2.01080604/utils/chap3_to_pod
Math-Pari-2.01080604/utils/comp_funcs.pl
Math-Pari-2.01080604/utils/foncpari.pl
Math-Pari-2.01080604/utils/inc.h
Math-Pari-2.01080604/utils/inc_h.diff
Math-Pari-2.01080604/utils/Math/
Math-Pari-2.01080604/utils/Math/PariBuild.pm
Math-Pari-2.01080604/utils/notes
Math-Pari-2.01080604/utils/paridoc_to_pod
Math-Pari-2.01080604/utils/README

  CPAN.pm: Going to build I/IL/ILYAZ/modules/Math-Pari-2.01080604.tar.gz

Did not find GP/PARI build directory around.

Do you want to me to fetch GP/PARI automatically?

  (If you do not, you will need to fetch it manually, and/or direct me to
  the directory with GP/PARI source via the command-line option paridir=/dir)

Make sure you have a large scrollback buffer to see the messages, or `tee'
the STDOUT/STDERR to a file.

Fetch? (y/n, press Enter) y
Getting GP/PARI from ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/
Cannot list (Failed to establish connection.
):  at utils/Math/PariBuild.pm line 319, <STDIN> line 1.

Can't fetch file with Net::FTP, now trying with LWP::UserAgent...
You do not have LWP::UserAgent and/or HTML::LinkExtor installed, cannot download, exiting...

I would certainly appreciate some help past this sticking point.

timmeke 06-08-2010 09:20 AM

Quote:

Cannot list (Failed to establish connection.
It sounds like the code is unable to connect via FTP to megrez.math.u-bordeaux.fr site.
When I open the FTP URL (e.g. in FTP client or browser), I can see the contents.

Could you try the same?
Perhaps even fetch the source manually and use the paridir=... option as suggested?
This could help in starting to sort out the connection issue.

Quote:

HTML::LinkExtor
Maybe you could try this one too?


All times are GMT -5. The time now is 03:18 AM.