CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: mod_perl:
Getting error "Can't locate ..."

 



GuerillaSquad
Novice

Jan 5, 2010, 7:15 AM

Post #1 of 3 (9549 views)
Getting error "Can't locate ..." Can't Post

Yesterday I installed the Net::SSH::Perl module locally so as to not affect the Perl installation on my server. I was able to get it installed without any errors but I am having an issue when i run my perl script.

In the top of the script I added two line:

Code
use lib '/scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/';   #script looking for Net/SSH/Perl.pm 
use Net::SSH::Perl;


I am just doing a simple test to see if this works so the code of the body is:

Code
my $s=Net::SSH::Perl->new("router-dev32.centera.lab.emc.com"); 
$s->login("root","241271");
my($so,undef)=$s->cmd("hostname");
print "$so\n";


But when I try to run this script I get an error:

Quote
Can't locate Math/Pari.pm in @INC (@INC contains: /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/ /usr/lib64/perl5/5.8.5/x86_64hread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi /usr/rl5/site_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-threa/usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usrl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thti /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perr_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/peor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util/SSH2MP.pm line0> line 1.
BEGIN failed--compilation aborted at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0>
Compilation failed in require at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util.pm line 56, <GEN0> line 1.
BEGIN failed--compilation aborted at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex/DH1.pm line 10, <GEN0> li
Compilation failed in require at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
Compilation failed in require at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
BEGIN failed--compilation aborted at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1
Compilation failed in require at /scripts/perl/localmodule/Net-SSH-Perl/lib/perl5/site_perl/5.8.5/Net/SSH/Perl.pm line 52, <GEN0> line 1.


I see it is looking for Math/Pari.pm

What can I do to get around this or do I have to install a dependency module to get the module I want working?


---------------------------
~The path to perfection is never clear~


FishMonger
Veteran / Moderator

Jan 5, 2010, 7:43 AM

Post #2 of 3 (9547 views)
Re: [GuerillaSquad] Getting error "Can't locate ..." [In reply to] Can't Post

Net::SSH::Perl requires numerous dependencies, so yes, you will need to install Math::Pari


GuerillaSquad
Novice

Jan 5, 2010, 2:10 PM

Post #3 of 3 (9537 views)
Re: [FishMonger] Getting error "Can't locate ..." [In reply to] Can't Post

I am really having trouble getting CPAN to work because of some permission error.

Now what????

I got this issue this morning; "insufficient permissions"
the .cpan directory tree is protected same as the user I am running as.

So I decided to blow away .cpan and try again. Only to hit the exact same error.

I am trying to install Net::SSH::Perl in CPAN.
I am using PREFIX= for makepl_arg, so that the module will be installed locally for Makefile.pl

Here is my error.
Can someone please help me get threw this?

/usr/bin/perl -Iinc Makefile.PL --config= --installdeps=Class::ErrorHandler,0,Crypt::DES_EDE3,0
*** Installing dependencies...
*** You are not allowed to write to the directory '/home/user/.cpan/sources';
the installation may fail due to insufficient permissions.

When I try with sudo that fails too.

Sorry, user is not allowed to execute '/usr/bin/perl Makefile.PL --config= --installdeps=Class::ErrorHandler,0,Crypt::DES_EDE3,0' as root on host


---------------------------
~The path to perfection is never clear~


(This post was edited by GuerillaSquad on Jan 5, 2010, 2:19 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives