Perl holds the path to its modules in the @INC list, so any modules Perl uses
must be located in one of those directories (or the directory where your script
is located). You can show the list of paths by typing in a bash shell:
perl -e 'print(join("\n", @INC), "\n\n");'
On my Windows system it happens to be the last path in the list;
/usr/lib/perl5/vendor_perl/5.8/ which is where all the modules are located.
That's under the D:\win32app\Spectrum\NT-Tools\SRE\ directory, so the location
of my Perl modules is
D:\win32app\Spectrum\NT-Tools\SRE\lib\perl5\vendor_perl\5.8\
Craig Porter, Enterprise Systems Management - Availability & Performance
Monitoring
Marsh & McLennan Companies
Global Technology Infrastructure (MGTI) | Centralized Operations
Sackville House 1.6, 143-149 Fenchurch Street, London EC3M 6BN, Great Britain
+44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 |
[email protected]<mailto:[email protected]>
www.mmc.com<http://www.mmc.com/>
From: Amitay Ben-ishay [mailto:[email protected]]
Sent: 30 December 2015 11:46
To: Porter, Craig; spectrum
Subject: RE: NCM - Use uncompiled lib
Hi Porter,
I ment to package install.
For example try to install Net::SSH::Expect.
It requires IO::Pty - the issue that I can add this package with cygwin.
Any case, do you know where is the default perl install in SS?
Best Regards, Amitay.
__________________
From: Porter, Craig [mailto:[email protected]]
Sent: Monday, December 28, 2015 8:39 PM
To: Amitay Ben-ishay; spectrum
Subject: RE: NCM - Use uncompiled lib
Perl is an interpreted language so you don't need to compile anything. Maybe
you mean installing a package that you have downloaded from CPAN? I suspect the
problem you have is missing dependencies.
The normal process to install a package from CPAN is to un-tar the package
(it's normally a .tar.gz file), then run:
perl Makefile.pl
make
make test
make install
That will only work if your system already has the required dependencies for
the module you are installing. On a Linux machine I normally install Perl
modules from the CPAN shell since it takes care of the dependencies for you. I
have not tried it on Cygwin so try it on a non-critical test machine first. You
might want to take a backup of your $SPECROOT directory before you start.
* Open a bash shell and type 'cpan' to open a CPAN shell. If that
doesn't work type 'perl -MCPAN -e shell'.
* If this is the first time you've run the CPAN shell it will ask if
you want to manually configure CPAN. You can type 'yes' if you want to do that
or 'no' and it will configure the settings automatically, which normally works
in my experience so try typing 'no'.
After that finishes (a few seconds) it will open a CPAN shell. Then to install
any module just type install and the name of the module you want to install eg.
cpan> install Net::SSH::Expect
It will try to download the module and any dependencies from the CPAN site and
install them automatically.
To test whether the module is installed and ready to use you can type something
like (from a bash shell):
perl -MNet::SSH::Expect -e 'print("Hello\n");'
perl -MBundle::Expect -e 'print("Hello\n");'
If the module is installed correctly it will just print "Hello". If there's a
problem then it will give you an error message like "Can't locate
Net/SSH/Expect.pm in @INC".
Hope that helps.
Craig Porter, Enterprise Systems Management - Availability & Performance
Monitoring
Marsh & McLennan Companies
Global Technology Infrastructure (MGTI) | Centralized Operations
Sackville House 1.6, 143-149 Fenchurch Street, London EC3M 6BN, Great Britain
+44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 |
[email protected]<mailto:[email protected]>
www.mmc.com<http://www.mmc.com/>
From: Amitay Ben-ishay [mailto:[email protected]]
Sent: 28 December 2015 15:17
To: spectrum
Subject: [spectrum] NCM - Use uncompiled lib
Hi all,
I need to create a new script in order to backup some devices using ssh.
In my script I want to use the following libs:
1. Net::SSH::Expect
2. Bundle::Expect
Seems like I need to complie this 2 libs.
I'm using win 64 bit.
I'm not able to compile it since lots of errors - it needs cygwin frame blab la
bla...
1. Any idea of implementing Net::SSH::Expect without using this lib?
2. How did you backup up running config on your ssh devices?
3. Can someone send me compiled files for 64bit?
Best Regards, Amitay.
__________________
Amitay Ben-Ishay
Senior Software Architecture & Product Manager
[cid:[email protected]]
Work: +972-54-7814588
Mobile:+972-54-9909149
Fax: +972-153-54-9909149
Email: [email protected]<mailto:[email protected]>
LinkedIN: Amitay's Profile<http://www.linkedin.com/in/amitay>
P please consider the environment before printing this email
------------------------------------------------------------
This message contains information that may be confidential or privileged.
If you are not the intended recipient, you may not use, copy or disclose
to anyone any of the information in this message. If you have received
this message and are not the intended recipient, kindly notify the sender
and delete this message from your computer.
* --To unsubscribe from spectrum, send email to
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum
[email protected]<mailto:[email protected]>
________________________________
Marsh Ltd. Registered in England and Wales Number: 1507274
Registered office 1 Tower Place West, Tower Place, London, EC3R 5BU.
Marsh Ltd is authorised and regulated by the Financial Conduct Authority.
This message and any attachments are confidential.
If you have received this message in error please delete it from your system.
If you require any assistance please notify the sender. Thank you.
------------------------------------------------------------
This message contains information that may be confidential or privileged.
If you are not the intended recipient, you may not use, copy or disclose
to anyone any of the information in this message. If you have received
this message and are not the intended recipient, kindly notify the sender
and delete this message from your computer.
________________________________
Marsh Ltd. Registered in England and Wales Number: 1507274
Registered office 1 Tower Place West, Tower Place, London, EC3R 5BU.
Marsh Ltd is authorised and regulated by the Financial Conduct Authority.
This message and any attachments are confidential.
If you have received this message in error please delete it from your system.
If you require any assistance please notify the sender. Thank you.
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]