I'm trying to use Google's reCaptcha v2 system with a Perl script. I can find information on how to use the modules in places like
Captcha::reCAPTCHA
and
Captcha::reCAPTCHA::V2
but the instructions on how to install the module are confusing.
I have cpan installed but I don't know the proper command to download and install the module. I'm running CentOS 7.
Can anybody walk me through what I need to do to get these libraries on my system?
Are these the same module/library?
installing cpan:
yum install cpan
Looks like this is the command that worked:
cpan Captcha::reCAPTCHA::V2
Related
I am trying to install some missing Perl modules because when I run my Perl script I am getting the error:
Can't locate Net/SFTP.pm in #INC (you may need to install the Net::SFTP module)
The first step I have taken to install this is:
I have brought up CPAN in CMD and run the command cpan> install foo but no luck because after I run the command I am getting:
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
I am on a proxy so I am wondering if there is a way round the proxy?
Another step I have taken is that I have installed strawberry Perl from http://strawberryperl.com/ but still no luck.
Lastly, I have the file 01mailrc.txt.gz locally install in my download folder but not sure how to install it.
FYI: I am on Windows. I have not used Perl before. The Perl version I use is:
This is Perl 5, version 26, subversion 1 (v5.26.1) built for MSWin32-x64-multi-thread
Could someone help me on this or show me a way around on how to install it?
I am making a Perl script to fetch files from a Unix Server using SFTP. I want to search the file using Regex and then download it to my system folder. I am using ActivePerl and Windows 64 bit environment. I looked on various posts which suggested the best way is using Net::SFTP::Foreign::Backend::Net_SSH2 but I am facing lots of errors while installing Net::SFTP and Net::SSH2.I cannot CPAN from my system and tried with GCC and dmake. Net::SFTP is halting at Math::Pari and Net::SSH2 is asking for libraries libssh2. I downloaded libssh2 from here but not able to install it.
Also can I use any 3-d part OS tools like psftp through Perl to server my requirements.
1. Net::SSH2 is not in offical PPM repositories. Install it using below:
ppm install http://www.sisyphusion.tk/ppm/Net-SSH2.ppd
Tested on Windows 7 and Perl 5.18.4
2. For Math::Pari check this answer Unable to install Math::Pari module
I've got perlbrew installed on OS X fine, and can install Perl modules from CPAN, using 'cpanm' no problem.
But, now I'm attempting to install a Perl module provided from a software vendor, and that PM is not on CPAN - you download it from their application and install it "locally".
I'm not sure how to accomplish this with perlbrew ?
The documentation states to do a direct install, download the tar.gz file, extract it, then:
cd Infoblox-xxxxxxx/
perl Makefile.PL
make
make install
But if I do this, I guess it will install it for the OS Perl version, not my perlbrew install.
The other option mentioned is to create a local CPAN site and add the appliance URL (to grab the Perl module) to the list of sites. Is this possible with perlbrew ?
Thanks !
cd Infoblox-xxxxxxx/
perl Makefile.PL
make
make install
But if I do this, I guess it will install it for the OS Perl version, not my perlbrew install.
If you are using perlbrew to select your perl, it should install in the appropriate location for the perl you selected.
which perl will tell you which perl you are using.
If you want to use a specific perl without leaving things to perlbrew, you can always invoke the specific perl you want using its full path:
cd Infoblox-xxxxxxx/
~/perl5/.../bin/perl Makefile.PL
make
make install
Can you tell me where to find a guide on how to install a perl module?
I am trying to install the perl module:
http://metacpan.org/pod/WWW::Mechanize::Firefox::Installation
I am stuck at step 7. I am not sure where the problem lays exactly, although I can get mozrepl to appear under tools. All I know is that when I run use WWW::Mechanize::Firefox; I get the following type of result:
Cannot locate www/mechanize/firefox.pmin #INC<#INC contain:
C:/Perl/site/lib C:/Perl/lib
In the directory in which I have perl, if I type ppm install WWW-Mechanize-Firefox I get
"ppm install filed: Can't find any package that provide
WWW-Mechanize-Firefox"
I use Windows XP.
I would appreciate any help. Thank you!
Based on this error:
Cannot locate www/mechanize/firefox.pmin #INC<#INC contain: C:/Perl/site/lib C:/Perl/lib
You need to install the module.
If you are using Strawberry Perl for instance, you should be able to simply:
cpan WWW::Mechanize::Firefox
I believe ActiveState supports the above, as well as ppm install WWW::Mechanize::Firefox
EDIT: ActiveState's Instructions
EDIT:
During the install, some of the tests failed. I then went ahead and followed the steps you linked to. At that point I went back and ran the tests using:
cpan -t WWW::Mechanize::Firefox
The tests open and close various windows in FF.
I've used this in anger only under Linux.
The problem (back then) was that the WWW modules didn't include hard dependencies for the MozRepl modules, hence the manual install.
My own instructions (from about 3 years ago)
cpan WWW::Mechanize::Firefox
cpan MozRepl
cpan MozRepl::RemoteObject
However, if it worked for Craig then it might be all ok now.
I have had trouble with IPC-Run in 64-bit Active Perl. ActiveState says it doesn't work. But I find it not necessary for basic uses of WWW::Mechanize::Firefox. If you install App::cpanminus, and in run cpanm -n WWW::Mechanize::Firefox I find that it pushes through the install of IPC-Run and you can go ahead using mechanize firefox in 64-bit windows instantiations.
Hope this helps someone!
-lta
I am looking for a way to auto install a missing perl module when my script runs. I would like to use cpan plus since it "seems" to available on both Windows and Linux but maybe I could have a way to drop down to standard cpan if cpan plus is not installed.
So how could one go about this? There is of course the cpan plus / cpan modules but are those able to integrated into a script?
Check this module: Carton Carton in CPAN, so first you installed all modules for your script, then you will make special dependency file under Carton and as result using this special file in other PC to install all dependency for you script. Please read description of this module in CPAN.
I hope it will help you.