Running the perl source [duplicate] - perl

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What's the easiest way to install a missing Perl module?
I downloaded the source code for a perl script. When I try to run it, however, it gives me the following error:
Can't locate Palm/PDB.pm in #INC (#INC contains: /root/Desktop /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /etc/perl/MobiPerl/MobiFile.pm line 3.
BEGIN failed--compilation aborted at /etc/perl/MobiPerl/MobiFile.pm line 3.
Compilation failed in require at ./html2mobi line 21.
BEGIN failed--compilation aborted at ./html2mobi line 21.
What can I possibly do to run this script?

You need to download the right module from CPAN - in this case,
Palm::PDB
Answers to this question explain how to install missing Perl modules.

You will need to find and install the module Palm::PDB from somewhere. It is available on CPAN.

Related

we are unable to access the CGI perl application after Linux OS upgrade from RHEL6 to RHEL7

we are unable to access the CGI perl application after Linux OS upgrade from RHEL6 to RHEL7.
Can't locate Carp.pm in #INC (#INC contains: /local/silas/lib2 /local/silas/lib/site_perl /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 /usr/share/perl5/CGI.pm line 3.
BEGIN failed--compilation aborted at /usr/share/perl5/CGI.pm line 3.
Compilation failed in require at /ford/eccws6/apache/htdocs/index.cgi line 9.
BEGIN failed--compilation aborted at /ford/eccws6/apache/htdocs/index.cgi line 9.
Please tell me what is exactly caused for this issue and do need to make any changes in setup?
Like #Shawn said in a comment, RedHat splits off core Perl modules into separate packages that don't get installed when you install perl or perl-core.
I believe you need the perl-Carp package:
yum install perl-Carp

Can't locate XML/Writer.pm in #INC . Cant locate DBD/CSV.pm in #INC

I tried using CPAN module XML::Writer, but I am getting following error:
Can't locate XML/Writer.pm in #INC (#INC contains: /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 testing.pl line 3.
BEGIN failed--compilation aborted at testing.pl line 3.
I checked for installation of the module using - perldoc XML::Writer and the document doesn't seems to be exist.
As I don't have the privilege to install the package as I am not the system administrator.
I have similar error for DBD::CSV too.
What can be done if a particular CPAN module not available/installed in the server where I am working and how do I install it without admin access?
Just an idea. I can't write this as an comment, because I'm a new user here and have not enough reputation to do this.
You can download the module files as XML-Writer-0.625.tar.gz from CPAN website https://metacpan.org/pod/XML::Writer and extract it in the same folder as your perl file.

MEAD (Perl Package) Installation

I am trying to install MEAD http://www.summarization.com/mead/ for text summarization, but when I try to run a basic example from the bin folder
./mead.pl GA3
I get the error below:
Cannot locate loadable object for module XML::Parser::Expat in #INC (#INC contains: mead/bin/../lib mead/bin/../lib/arch /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 mead/bin/../lib/XML/Parser.pm line 15
Compilation failed in require at mead/bin/../lib/XML/Parser.pm line 15.
BEGIN failed--compilation aborted at mead/bin/../lib/XML/Parser.pm line 19.
Compilation failed in require at /mead/bin/../lib/MEAD/Cluster.pm line 16.
BEGIN failed--compilation aborted at mead/bin/../lib/MEAD/Cluster.pm line 16.
Compilation failed in require at ./mead.pl line 29.
BEGIN failed--compilation aborted at ./mead.pl line 29.
Strange enough, I already have expat installed. I am wondering, what could be the cause of this error?
I highly recommend you reading mead documentation before starting. In page 7 of this document, it is pointed out the required perl libraries for mead. You can find required perl library under path/mead/external. Install all libraries under the external directory, it will run without any problems.
Required Libraries:
Perl 5.5 or above
XML::Parser
Expat
XML::Writer
XML::TreeBuilder
Text::Iconv
etc.

Linux, Backtrack, Perl, Bluesniff

I am trying to run bluesniff on backtrack.I have the bluesniff.pl script and when i try to execute it by typing:
perl bluesniff.pl
An error message came out:
Can't locate Curses.pm in #INC (#INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.1/Curses/Application.pm line 92.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Curses/Application.pm line 92.
Compilation failed in require at bluesniff.pl line 23.
BEGIN failed--compilation aborted at bluesniff.pl line 23.
Please advise!
To all who commented, thanks! It worked.
Run
cpan Curses
from the command line to install this module and all dependencies.
You need to download the Curses Perl module.
You can install Curses simply by typing apt-get install libcurses-ui-perl if you don't need to learn and install all the Perl stack. If you prefer to, do as others said and use Cpanm to install it.

Can't locate Bench.pm in #INC [Perl] [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 9 years ago.
I have a problem when i compile my perl program :
it mention :
Can't locate Bench.pm in #INC (#INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at test.pl line 4.
BEGIN failed--compilation aborted at test.pl line 4.
Any idea please?
Thanks
Install Bench as you would any other CPAN module, e.g. with cpanm, cpanp or cpan.
You might want to first use perlbrew to install a local (and newer) version of Perl so you won't be touching anything related to the system Perl installation.
First, check if you have installed Bench module:
%> perl -MBench -e 1
If you get the error message, you have to install it:
%> cpan Bench