Hi monks
I am trying to compile Net::SSH::Perl 1.34.. I compiled it, but when i run a script to SSH using Net:SSH::Perl, i get the following error
Can't locate Math/Pari.pm in @INC (@INC contains: /usr/local/lib/perl5 +/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/s +ite_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr +/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.8.8 +/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +8.8/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/ +Net/SSH/Perl/Util.pm line 56, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +8.8/Net/SSH/Perl/Kex/DH1.pm line 10, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/ +Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +8.8/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/ +Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5. +8.8/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/ +Net/SSH/Perl.pm line 52, <GEN0> line 1.

So, i tried installing Math-GMP, but before that i needed the GMP-libraries.. So, i did an installation of the GMP libraries(gmp-4.3.2.tar.bz2).. This gave no issues or errors, but when i tried installing Math-GMP(Math-GMP-2.06.tar.gz), it gives me an 'wrong ELF class' error...
make gcc -c -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/ +usr/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFS +ET_BITS=64 -O -DVERSION=\"2.06\" -DXS_VERSION=\"2.06\" -fPIC "-I/ +usr/local/lib/perl5/5.8.8/sun4-solaris/CORE" GMP.c Running Mkbootstrap for Math::GMP () chmod 644 GMP.bs rm -f blib/arch/auto/Math/GMP/GMP.so LD_RUN_PATH="/usr/local/lib" gcc -G -L/usr/local/lib -L/opt/gnu/lib G +MP.o -o blib/arch/auto/Math/GMP/GMP.so \ -lgmp \ ld: fatal: file /usr/local/lib/libgmp.so: wrong ELF class: ELFCLASS64 ld: fatal: File processing errors. No output written to blib/arch/auto +/Math/GMP/GMP.so collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/Math/GMP/ +GMP.so'

I read in some forums that this is caused due to 32/64 bit compatibility, but dont know how to resolve this..

Can somebody help me out?? Is there any other way to install the Net::SSH::Perl module or any other Perl module to do SSH(which has a hassle free installation)

Regards,
Blub:)



PS:-All this is done in Sun Solaris, Perl 5.8.8 and gcc 3.4.6

In reply to Compiling Net::SSH::Perl by LinuxUser2008

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.