LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2010, 01:01 AM   #1
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 144

Rep: Reputation: 15
Thumbs down 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.
 
Old 06-08-2010, 09:20 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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?

Last edited by timmeke; 06-08-2010 at 09:24 AM.
 
Old 02-13-2021, 08:58 AM   #3
bruz
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
Hi,

it's a pretty old thread here, but I'm hitting the same problem.

In my case, the domain 'megrez.math.u-bordeaux.fr' seems to be not reachable. I tried it with deifferent tools (FTP and HTTP) and on different networks (DSL and mobile) with same result. Does anyone have an idea, if there is an alternative to get Math::Pari installed without the files from the failing domain (I'm a very beginner with perl an CPAN).

My search on web didn't get me further yet...

Thanks for your hints in advance!
 
Old 02-13-2021, 01:51 PM   #4
bruz
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
The server was down... Now it seems to be back and the installation works as expected.
 
Old 02-13-2021, 07:55 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
@bruz - Welcome to LQ and the Programming forum!

Indeed, this is an old thread. It is generally preferable to start your own thread for two important reasons:

1. Even though your case may seem very similar, your own thread assures that the discussion is constrained to the particulars of your own case which makes it easier for those offering help and all future visitors to follow without being sidetracked by differences - in either thread.

2. Your new thread will be automatically bumped to guarantee it is visible to current members, whereas the old thread, and your question, will disappear into the mists of time!

But no harm done, and thanks for reporting your ultimate success!
 
1 members found this post helpful.
  


Reply

Tags
perl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl module Audio::MPEG CPAN install secesh Programming 6 08-12-2014 09:53 PM
CPAN module install error ilnli Programming 1 04-06-2008 02:18 AM
Where is CPAN? How do I install new module? NeilJones Mandriva 4 12-22-2007 02:59 PM
Unable to install Perl module via CPAN Sparky.Watson Linux - Software 1 08-24-2005 08:23 PM
perl module Audio::MPEG CPAN install secesh Linux - Software 0 09-17-2004 01:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration