jtzako has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to install Net::OpenSSH using perl cpan installation and I believe it is not working properly. I used 'sudo perl -MCPAN -e 'install Net::OpenSSH'and it ran for a while then stopped at this point: (No further activity or even return to prompt after)
determine prerequisites cp lib/Net/OpenSSH/ConnectionCache.pm blib/lib/Net/OpenSSH/ConnectionC +ache.pm cp lib/Net/OpenSSH/ShellQuoter/fish.pm blib/lib/Net/OpenSSH/ShellQuote +r/fish.pm cp lib/Net/OpenSSH/ShellQuoter.pm blib/lib/Net/OpenSSH/ShellQuoter.pm cp lib/Net/OpenSSH/ShellQuoter/POSIX.pm blib/lib/Net/OpenSSH/ShellQuot +er/POSIX.pm cp lib/Net/OpenSSH/ModuleLoader.pm blib/lib/Net/OpenSSH/ModuleLoader.p +m cp lib/Net/OpenSSH/ShellQuoter/Chain.pm blib/lib/Net/OpenSSH/ShellQuot +er/Chain.pm cp lib/Net/OpenSSH/Constants.pm blib/lib/Net/OpenSSH/Constants.pm cp lib/Net/OpenSSH/SSH.pm blib/lib/Net/OpenSSH/SSH.pm cp lib/Net/OpenSSH/ShellQuoter/MSWin.pm blib/lib/Net/OpenSSH/ShellQuot +er/MSWin.pm cp lib/Net/OpenSSH/OSTracer.pm blib/lib/Net/OpenSSH/OSTracer.pm cp lib/Net/OpenSSH.pm blib/lib/Net/OpenSSH.pm cp lib/Net/OpenSSH/ShellQuoter/MSCmd.pm blib/lib/Net/OpenSSH/ShellQuot +er/MSCmd.pm cp lib/Net/OpenSSH/ShellQuoter/csh.pm blib/lib/Net/OpenSSH/ShellQuoter +/csh.pm cp lib/Net/OpenSSH/ObjectRemote.pm blib/lib/Net/OpenSSH/ObjectRemote.p +m Manifying blib/man3/Net::OpenSSH::Constants.3perl Manifying blib/man3/Net::OpenSSH::SSH.3perl Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSWin.3perl Manifying blib/man3/Net::OpenSSH::ConnectionCache.3perl Manifying blib/man3/Net::OpenSSH::ShellQuoter::MSCmd.3perl Manifying blib/man3/Net::OpenSSH.3perl Manifying blib/man3/Net::OpenSSH::OSTracer.3perl SALVA/Net-OpenSSH-0.70.tar.gz /usr/ccs/bin/make -- OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent state Running make test PERL_DL_NONLAZY=1 /opt/csw/bin/perl "-MExtUtils::Command::MM" "-e" "te +st_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1_run.t .... skipped: OpenSSH 4.1 or later required t/quoting.t .. Use of uninitialized value $ENV{"LANG"} in pattern matc +h (m//) at t/quoting.t line 17.

Replies are listed 'Best First'.
Re: Cpan install gets stuck installing Net OpenSSH ?
by syphilis (Archbishop) on Mar 11, 2016 at 02:05 UTC
    I see:
    t/1_run.t .... skipped: OpenSSH 4.1 or later required


    You obviously don't have OpenSSH 4.1 or later, but the Net-OpenSSH-0.70 README says that OpenSSH 4.1 or later is required, and recommends OpenSSH 5.x.

    I therefore suggest your problem is that your version of OpenSSH is too old (and unsupported by Net-OpenSSH-0.70).
    However, I don't actually know if this is the case - but the first thing I would try is to update the OpenSSH installation.

    Cheers,
    Rob
      Actually, that looks like a Solaris box. The ssh client bundled is an old fork of OpenSSH (SUN ssh, well, now probably Oracle SSH) which is not supported by Net::OpenSSH.

      Packages for the real OpenSSH may be available from Oracle or 3th party repositories.

        I got farther this time. No errors about missing or wrong versions of OpenSSH. But I am still getting stuck at this: Password: t/1_run.t .... skipped: Unable to establish SSH connection to localhost! t/quoting.t .. Use of uninitialized value $ENV{"LANG"} in pattern match (m//) at t/quoting.t line 17. I'm not sure what/where this env value is located or how to fix it.
      It appears this is the case. We have the sun version of OpenSSL and SSH. I'm looking into getting those upgraded.
      OK, so now that I got the ENV variable sorted out, it is still getting stuck at "t/quoting.t". However, it is not giving me any error now, it just sits there until it eventually times out (takes 1hr+ for some reason).

        The next step is to run the hanging test in isolation to see at which test it stalls (and maybe even see why):

        cpan CPAN> look Net::OpenSSH $ perl Makefile.PL $ make $ perl -Ilib -w t/quoting.t
Re: Cpan install gets stuck installing Net OpenSSH ?
by neilwatson (Priest) on Mar 10, 2016 at 20:12 UTC

    Something in t/quoting.t by the look of it. Try running that by hand.

    Neil Watson
    watson-wilson.ca

      I tried a different install method, using cpanminus and ended up with this: Building and testing Net-OpenSSH-0.70 ... FAIL ! Timed out (> 1800s). Use --verbose to retry. ! Installing Net::OpenSSH failed. See /usr/local/home/jm3731/.cpanm/work/1457646119.8139/build.log for details. Retry with --force to force install it. 1 distribution installed

        I tried a different install method, using cpanminus and ended up with this: SUMMARY

        And then what happened?

        Why aren't you running the failing tests by hand?

        or make test TEST_VERBOSE=1 TEST_FILES=t/quoting.t

        or prove -vb t/quoting.t

        or perl -Mblib t/quoting.t

        or all of them verbosely? make test TEST_VERBOSE=1

        or prove -vbr t