3

When i try to install Net::SSH::Expect perl module i am getting the below error.

perl Makefile.PL
Warning: prerequisite Expect 1.14 not found.
Writing Makefile for Net::SSH::Expect
Writing MYMETA.yml

I have expect installed in my ubuntu machine.

expect version 5.45

But still when try installing it throws me this warning. Please advice.

chidori
  • 1,052
  • 3
  • 12
  • 25

2 Answers2

5

'expect version 5.45 ?' I believe the latest version is 1.09. Type 'which expect'. The '/usr/bin/expect' program, is not the same as the Net::SSH::Expect module for Perl. And current version does not require the older version. However it does require that Expect (proper) already be installed on your system. BEFORE using Horus' command. Do this first:

> sudo cpan Bundle::Expect

If all goes well, then run the command:

> sudo cpan Net::SSH::Expect

It's possible that 'Bundle::Expect' needs interaction (or has some issues) that keeps cpan from automatically installing it.

Jim Black
  • 1,422
  • 1
  • 13
  • 26
  • Thanks, that helped installing the module . Btw.. what if i wanted to install it in local mount point. I want to install these modules as local user on some local mount point and i don't have internet access in that machine ? – chidori Mar 03 '13 at 12:02
  • It's doable. The entire Perl installation I use at work is 'locally' installed (5.16.2), compared to the 5.8.5 version included with the RHEL server, but better. It is easier when running Perl locally, but most modules (not all) can be installed locally with the 'root' owned Perl. See: http://stackoverflow.com/questions/102850/how-can-i-install-cpan-modules-locally-without-root-access-dynaloader-pm-line-2 – Jim Black Mar 03 '13 at 15:56
3

It's expecting the perl library Expect, not expect. I would recommend:

> sudo cpan Net::SSH::Expect

At the command line. I just got it to install properly on 12.04. My apt-cache search did not return anything for libnet-ssh-expect-perl (so no Ubuntu package for it at 12.04, the last LTS), so CPAN is your best bet, I think.

Horus
  • 1,169
  • 9
  • 13
  • `Going to read '/root/.cpan/Metadata' Database was generated on Sat, 02 Mar 2013 20:53:03 GMT Net::SSH::Expect is up to date (1.09).` Ok , after executing it , i got the above message, does that mean its installed ? – chidori Mar 02 '13 at 21:02
  • Yup. You should be done. Try, on the command line: perl -MNet::SSH::Expect – Horus Mar 03 '13 at 16:08