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

I'm running Ubuntu 18.04.2

This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi (with 67 registered patches, see perl -V for more detail)

I have make installed (all I did was sudo apt-get update; sudo apt-get install make).

I installed CPAN according to this:

https://how-to.fandom.com/wiki/How_to_install_PERL_modules

The first line

perl -MCPAN -e install Net::SCP::Expect

seems to have only install cpan (well MCPAN is what it's called now)?

So then I did:

sudo perl -MCPAN -e shell

And "install Net::SCP::Expect"

It ended with this:

Test Summary Report ------------------- t/01-test.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 14 tests but ran 0. t/02-bc.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output t/03-log.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 11 tests but ran 0. t/04-multiline.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 33 tests but ran 0. t/10-internal.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 17 tests but ran 0. t/11-calc.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output Files=6, Tests=0, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.27 cusr + 0.06 csys = 0.36 CPU) Result: FAIL Failed 6/6 test programs. 0/0 subtests failed. Makefile:883: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 2 JACOBY/Expect-1.35.tar.gz make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports JACOBY/Expect-1.35.tar.gz RYBSKEJ/Net-SCP-Expect-0.16.tar.gz Has already been unwrapped into directory /home/bog/.cpan/build/Net- +SCP-Expect-0.16-2 RYBSKEJ/Net-SCP-Expect-0.16.tar.gz Has already been prepared Running make for R/RY/RYBSKEJ/Net-SCP-Expect-0.16.tar.gz Warning: Prerequisite 'Expect => 1.14' for 'RYBSKEJ/Net-SCP-Expect-0.1 +6.tar.gz' failed when processing 'JACOBY/Expect-1.35.tar.gz' with 'ma +ke_test => NO'. Continuing, but chances to succeed are limited. cp Expect.pm blib/lib/Net/SCP/Expect.pm Manifying 1 pod document RYBSKEJ/Net-SCP-Expect-0.16.tar.gz make -- OK Running make test PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/l +ib', 'blib/arch')" t/*.t t/attributes.t .... ok t/glob.t .......... ok t/signature.t ..... skipped: Set the environment variable TEST_SIGNATU +RE to enable this test. t/string_parse.t .. ok All tests successful. Files=4, Tests=54, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.26 cusr + 0.03 csys = 0.32 CPU) Result: PASS RYBSKEJ/Net-SCP-Expect-0.16.tar.gz Tests succeeded but one dependency not OK (Expect) RYBSKEJ/Net-SCP-Expect-0.16.tar.gz [dependencies] -- NA Failed during this command: TODDR/IO-Tty-1.14.tar.gz : writemakefile NO '/usr +/bin/perl Makefile.PL INSTALLDIRS=site' returned status 6400 JACOBY/Expect-1.35.tar.gz : make_test NO RYBSKEJ/Net-SCP-Expect-0.16.tar.gz : make_test NO one depen +dency not OK (Expect)
I could give you the whole output if you want. What am I doing wrong? I'm not doing anything else with perl right now. (I mean Ubuntu probably is somewhere but that's all standard stuff.)

Replies are listed 'Best First'.
Re: Installing Net::SCP::Expect - it can't find/install Expect
by haukex (Archbishop) on Apr 08, 2020 at 23:23 UTC

    Net::SCP::Expect was last released over 10 years ago... nowadays, for *NIX systems, I can very much recommend Net::OpenSSH.

    Also, although using the regular CPAN client like you showed is fine, I think App::cpanminus (cpanm) is also nicer.

Re: Installing Net::SCP::Expect - it can't find/install Expect
by kcott (Archbishop) on Apr 09, 2020 at 06:59 UTC

    G'day mrkrinkle,

    Welcome to the Monastery.

    "perl -MCPAN -e ... (well MCPAN is what it's called now)?"

    No, it's still called CPAN.

    The -M option loads a module, what comes after is the name of the module to be loaded; so, that's -M followed by CPAN.

    See perlrun for details of that and other options.

    — Ken

Re: Installing Net::SCP::Expect - it can't find/install Expect
by hippo (Archbishop) on Apr 09, 2020 at 08:11 UTC
    Failed during this command: TODDR/IO-Tty-1.14.tar.gz : writemakefile NO '/usr +/bin/perl Makefile.PL INSTALLDIRS=site' returned status 6400 JACOBY/Expect-1.35.tar.gz : make_test NO RYBSKEJ/Net-SCP-Expect-0.16.tar.gz : make_test NO one depen +dency not OK (Expect)

    Perhaps the root cause is actually with IO::Tty?

    Note that there are bionic packages for both Expect and Net::SCP::Expect. Why not just install those instead?

Re: Installing Net::SCP::Expect - it can't find/install Expect
by mrkrinkle (Novice) on Apr 11, 2020 at 23:52 UTC
    Thanks guys, Net::OpenSSH did the trick.