Link to home
Start Free TrialLog in
Avatar of imagitastech
imagitastech

asked on

Perl CGI script Can't reach Validate.pm

When running a Perl script which uses libraries for Spreadsheet-ParseExcel this error stops completion.

Can't locate Params/Validate.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/5.8.8/Class/MethodMaker.pm line 9.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/GnuPG/Options.pm line 59.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/GnuPG/Options.pm line 59.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/GnuPG/Interface.pm line 28.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/GnuPG/Interface.pm line 28.
Compilation failed in require at /var/www/cgi-bin/EpsilonEOD line 13.
BEGIN failed--compilation aborted at /var/www/cgi-bin/EpsilonEOD line 13.

Yet I find two versions on Validate.pm in the Perl libraries path.

-rw-r--r-- 1 root root 4154 Jan 21  2006 /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Attribute/Params/Validate.pm
-rw-r--r-- 1 root root 21904 Mar  7  2007 /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Params/Validate.pm

The closet the path comes is at /usr/lib/perl5/vendor_perl/5.8.8

How can the search be made to include /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Params

use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use Spreadsheet::ParseExcel;
use File::Temp;
use IO::Handle;
use GnuPG::Interface;
 
/var/www/cgi-bin/EpsilonEOD line 13 is "use GnuPG::Interface;"

Open in new window

SOLUTION
Avatar of Kim Ryan
Kim Ryan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of imagitastech
imagitastech

ASKER

I tried both setting execute permission to Validate.pm and it didn't resolved the problem.

How do you modify @INC  to include '/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Params' ?

Obviously I'm a newbie using Perl but it seems to me there may be a version mismatch with

/usr/lib/perl5/5.8.8/Class/MethodMaker.pm

line 9 is

use Params::Validate qw(validate_pos);
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm a newbie; the answer was concise but I need a bit more detail.

The actual line that worked did not include the '/Params'

use lib '/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi';

Thanks to everyone for their help.