Trying to capture a device config and it fails. Why do I receive the following error "SPC-OCC-10746: The operation failed. SPC-NCM-200007: Capture Running Script Returned Error [2]: Can´t locate Net/SSH/Expect.pm in @INC" from a Linux SpectroSERVER when I try to do an NCM capture on a device?
Spectrum 10.2.x
Spectrum 10.3.x
Spectrum 10.4.x
Red Hat Linux
The error "Can´t locate Net/SSH/Expect.pm in @INC" means that the PERL module Expect Bundle has not been installed or is installed in a path outside of the PERL @INC path.
As PERL is part of the Linux distribution we do not install PERL modules in Linux during the SpectroSERVER install, and therefore, this needs to be done by the Linux Administrator
To resolve this issue there are two options, an automatic option with connection to the internet for Perl distributions or a manual method incase you do not have internet access on these servers.
Method 1 Automatic Method with Internet Connection
From Root give the following command:
perl -MCPAN -e 'install Bundle::Expect'
The Expect Bundle and all of its dependencies will be installed.
Method 2 with no internet connection on the Linux server
1 Download https://cpan.metacpan.org/authors/id/B/BN/BNEGRAO/Net-SSH-Expect-1.09.tar.gz from another computer and transfer this to your server
2 gzip -d Net-SSH-Expect-1.09.tar.gz
3 tar xvf Net-SSH-Expect-1.09.tar
4 cd Net-SSH-Expect-1.09.tar
5 perl Makefile.PL
6 make
7 make test
8 make install
9 Execute the following command to verify Net::SSH::Expect is now in the installed perl modules list:
perl -MExtUtils::Installed -e 'print $_,$/ for ExtUtils::Installed->new()->modules();'
10 Print INC paths using the following command:
perl -e "print qq(@INC)"
11 Verify Net::SSH::Expect is in INC path using the following command:
perldoc -l Net::SSH::Expect
Once method 1 or method 2 have been performed you should now be able to capture the configuration from the device with no further errors.