Can't find RackMonkey::CGI module - perl

For some odd reason... Rackmonkey::CGI.pm is not being picked up... what am I doing incorrectly here?
Thanks!
Can't locate RackMonkey/CGI.pm in #INC (#INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./rackmonkey.pl line 34.
BEGIN failed--compilation aborted at ./rackmonkey.pl line 34.
blah blah > locate CGI.pm
/usr/lib/perl5/5.8.8/CGI.pm
use RackMonkey::CGI;
use RackMonkey::Engine;
use RackMonkey::Error;

You don't have Rackmonkey/CGI.pm in your path. In fact, I bet none of the Rackmonkey::* modules are in your path.
Here's how to fix it…if your /www/RackMonkey directory is inside /blahblah/, then add:
use lib '/blahblah/www/RackMonkey';
above your other use lines.

The error says it all. There's no RackMonkey component in CGI.pm's path. Ie - a bare use CGI; would work here because /usr/lib/perl5/5.8.8 is in #INC. CGI.pm would have to live under /some/directory/in/#INC/RackMonkey in order for use RackMonkey::CGI; to work out of the box.
See perldoc perlvar under #INC, and perldoc -f require for more info about module inclusion behavior.

Related

Why do I get "Can't locate loadable object for module" even after installing the module?

Could anyone point me to possible causes of Perl not finding an installed module?
$ ll /usr/share/perl5/Unix/Processors.pm
-rw-r--r-- 1 root root 3.2K Sep 11 12:39 /usr/share/perl5/Unix/Processors.pm
Ok,
$ perldoc -l Unix::Processors
/usr/share/perl5/Unix/Processors.pm
Ok, but
$ perl -MUnix::Processors -e1
Can't locate loadable object for module Unix::Processors in #INC (#INC contains: /usr/lib/cegma /usr/share/mocat/src /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 -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
FIXED: I had put the compiled Processors.so next to the .pm when it should be in the auto directory.
The Unix::Processors module has an XS (C) component that has to be compiled and linked as part of the installation process. The error message Can't locate loadable object is referring to this component (a shared library) rather than the .pm module file itself
This is a symptom of a wrongly-installed module, and most often happens when the .pm file has been simply copied into place instead of being installed properly as described in perldoc perlmodinstall. It can also happen if the installation has been forced, regardless of any errors in the build and test phases.

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).

"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.

Cloudstack api error: BEGIN failed--compilation aborted at sign.pl line 12

Error message:
Can't locate XML/Twig.pm in #INC (#INC contains: /usr/local/lib64/perl5 /usr/loc al/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/li b64/perl5 /usr/share/perl5 .) at sign.pl line 12.
BEGIN failed--compilation aborted at sign.pl line 12.
The error is due to a missing Perl module.
See this answer:
What's the easiest way to install a missing Perl module?
If you have SELinux running you may have to restore the security contexts for the web folder.
For instance:
restorecon -Rv /var/www/html

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

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.