Perl - Getting an error with Net/SSLeay.pm - I am trying to POST XML via HTTPS web service - perl

I am trying to use Net/SSLeay.pm in Perl, code says use Net::SSLeay
Error message says the following -
Can't locate Net/SSLeay.pm in #INC (#INC contains: C:/Perl/site/lib C:/Perl/lib .) at test.pl line 7.
BEGIN failed--compilation aborted at test.pl line 7.
I installed SSLeay.pm via Perl Package Manager and verified it -
Crypt-SSLeay
OpenSSL support for LWP
Version: 0.57
Released: 2008-05-02
Author: David Landgren
CPAN: http://search.cpan.org/dist/Crypt-SSLeay-0.57/
Installed files:
C:/Perl/lib/Crypt/SSLeay.pm
C:/Perl/lib/Crypt/SSLeay/CTX.pm
C:/Perl/lib/Crypt/SSLeay/Conn.pm
C:/Perl/lib/Crypt/SSLeay/Err.pm
C:/Perl/lib/Crypt/SSLeay/MainContext.pm
C:/Perl/lib/Crypt/SSLeay/X509.pm
C:/Perl/lib/Net/SSL.pm
C:/Perl/lib/auto/Crypt/SSLeay/.packlist
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.bs
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.dll
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.exp
C:/Perl/lib/auto/Crypt/SSLeay/SSLeay.lib
I am unsure as to why my script does not find it, any help would be appreciated.

Crypt-SSLeay and Net-SSLeay are two different CPAN distributions. If you want to use Net::SSLeay, install "Net-SSLeay" ppm distribution.

Related

How to install libdata-validate-ip-perl in centos

I'm trying to use IP in my perl script and i got module not found error. When i tried to install it with dnf im getting no match found for the package.
use Data::Validate::IP;
Can't locate Data/Validate/IP.pm in #INC (you may need to install the
Data::Validate::IP module) (#INC contains: ../utils
/usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5) at ../utils/VM.pm line 5. BEGIN
failed--compilation aborted at ../utils/VM.pm line 5. Compilation
failed in require at ./myscript.pl line 37.
#dnf install libdata-validate-ip-perl
Extra Packages for Enterprise Linux 8 - Epel (Intel mirror) 5.6 kB/s | 4.7 kB 00:00
Last metadata expiration check: -1596 days, 2:25:26 ago on Wed 09 Nov 2022 09:59:43 AM IST.
No match for argument: libdata-validate-ip-perl
Error: Unable to find a match: libdata-validate-ip-perl
Looking for suggestions to install perl missing modules
"libdata-validate-ip-perl" would be the name of the package on Debian-based distributions, such as Ubuntu.
Redhat-based distributions use a different naming convention for their packages. Try "perl-Data-Validate-IP".
I would use
sudo cpan Data::Validate::IP
See here https://perldoc.perl.org/cpan

getting error while using pdftk tool

for performing the pdf modifications install the cpan module PDF::Tk [Perl integration for the pdf toolkit (pdftk)], but while using the functionality of pdftk getting the below set of error, Can anyone please help me in resolving this.
code samples used:
script name: test.pl -- used to reverse the pdf contain
1)use PDF::Tk;
pdftk inputPDF.pdf cat end-1 output outPDF.pdf
==> Can't locate IO/All.pm in #INC (#INC contains: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/site_perl/5.8.5/PDF/Tk.pm line 2.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/PDF/Tk.pm line 2.
Compilation failed in require at testPDF.pl line 1.
BEGIN failed--compilation aborted at testPDF.pl line 1.
2) use PDFTk;
pdftk inputPDF.pdf cat end-1 output outPDF.pdf
==>Can't locate PDFTk.pm in #INC (#INC contains: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl .) at testPDF.pl line 1.
BEGIN failed--compilation aborted at testPDF.pl line 1.
I don't really understand your second example. You're talking about PDF::Tk, so I don't know why you're trying to use a module called PDFTk. I think we can safely ignore that.
Your first example looks like it's getting further. It has found PDF::Tk and is trying to load it. But something is loading IO::All which is apparently missing from your system.
So the solution is to install IO::All. But it makes me wonder how you installed PDF::Tk. Any sane module installation method will also pull in any required modules (and IO::All is clearly listed as a required module for PDF::Tk).

Not installed or installed?

I have a problem in installing modules CPAN on my pc.
I wanted to install a module from CPAN and the problem is ... If i do that command :
perl -MCPAN -e 'install XML::DT'
The answer is :
XML::DT is up to date (0.63).
But when i try to run my program with the module XML::DT, it tells me that i don't have installed !
So... What options do i have to solve this?
Error given to me is :
Can't locate XML/DT.pm in #INC (#INC contains:
/Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16
/Network/Library/Perl/5.16/darwin-thread-multi-2level
/Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2
/System/Library/Perl/5.16/darwin-thread-multi-2level
/System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.16 .) at ./EX.pl line 2.
BEGIN failed--compilation aborted at ./EX.pl line 2.

"Compilation failed in require at /home/ubuntu/perl5/lib/perl5/App/DuckPAN/Cmd.pm line 22."

I can't seem to get duckpan to work. Here is the error I am receiving, any ideas?
Checking for latest App::DuckPAN ... 0.135
Checking for latest DDG Perl package... 0.120
Using the following DDG instant answers:
- DDG::Goodie::ABC (Words)
- DDG::Goodie::AltCalendars (Words)
- DDG::Goodie::Anagram (Words)
- DDG::Goodie::Ascii (Words)
- DDG::Goodie::AspectRatio (Words)
- DDG::Goodie::Atbash (Words)
- DDG::Goodie::Average (Words)
Can't locate Math/Int2Base.pm in #INC (#INC contains: lib /home/ubuntu/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int /home/ubuntu/perl5/lib/perl5 /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at lib/DDG/Goodie/Base.pm line 4.
BEGIN failed--compilation aborted at lib/DDG/Goodie/Base.pm line 4.
Compilation failed in require at /home/ubuntu/perl5/lib/perl5/App/DuckPAN/Cmd.pm line 22.
As #rutter mentioned, the problem is that you're missing a dependency for the Goodie package.
DuckPAN provides an easy way to install all the dependencies (which installed them via CPAN as rutter suggested), once you're in the root of your Goodie repo (zerclickinfo-goodie), run duckpan installdeps and this will install everything necessary to run duckpan server or duckpan query.
BTW, in the future it's best to report these issues in the relevant repo, in this case the DuckPAN repo: https://github.com/duckduckgo/p5-app-duckpan, as we check those daily.

Perl module broke my windows xampp installation

PROBLEM: In the process of trying to install gitstat on a Windows7 machine I broke my xampp Apache installation. Now I can't get gitstat or apache to work.
APACHE ERROR:
[error] Can't load Perl file: C:/xampp/apache/conf/extra/startup.pl for server localhost:80, exiting...`
Other people have reported this issue being caused by the PERL5LIB environment variable, but that variable does not exist on my machine.
WHAT I DID / GITSTAT ERROR:
I needed the SOAP::Lite module installed so I followed the windows guide here: http://soaplite.com/install.html
As far as I could tell I installed the module successfully, console output below
cpan[1]> install SOAP::Lite
CPAN: Storable loaded ok (v2.21)
Going to read '\xampp\perl\bin\.cpan\Metadata'
Database was generated on Wed, 27 Jun 2012 02:47:03 GMT
SOAP::Lite is up to date (0.714).
I saw a SOAP directory in perl/site/lib which (to me) means that the module should be available. When I look in my perllocal.pod file SOAP:Lite is in there.
Part of the gitstat installation instructions say to copy the Lite.pm file from perl/site/lib/SOAP into gitstat\gstat_pl\lib
However, when I try to perform step nine of gitstat installation (perl gitstat.pl HEAD) I get the following:
C:\xampp\htdocs\gitstat\gstat_pl>perl gitstat.pl HEAD
Supported versions:
BEGIN failed--compilation aborted at C:/xampp/perl/site/lib/SOAP/Lite.pm line 34
86.
Compilation failed in require at C:/xampp/perl/site/lib/SOAP/Constants.pm line 1
3.
BEGIN failed--compilation aborted at C:/xampp/perl/site/lib/SOAP/Constants.pm li
ne 13.
Compilation failed in require at lib/Lite.pm line 3444.
BEGIN failed--compilation aborted at lib/Lite.pm line 3444.
Compilation failed in require at gitstat.pl line 30.
If I don't copy the file from perl/site/lib/SOAP then I get
C:\xampp\htdocs\gitstat\gstat_pl>perl gitstat.pl HEAD
Can't locate lib/Lite.pm in #INC (#INC contains: C:/xampp/perl/lib C:/xampp/perl
/site/lib .) at gitstat.pl line 30.
I don't understand why CPAN didn't install the Lite.pm module in the #INC path or why the compilation might fail when the module is available, or most importantly why my Apache install is broken. Also I'm very new to Perl and CPAN and my understanding of Apache is primitive so simpler explanations would be greatly appreciated.