Perl CGI script Can't reach

Posted on 2009-04-29
Last Modified: 2013-12-25
When running a Perl script which uses libraries for Spreadsheet-ParseExcel this error stops completion.

Can't locate Params/ 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/ line 9.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/GnuPG/ line 59.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/GnuPG/ line 59.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/GnuPG/ line 28.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/GnuPG/ 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 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/
-rw-r--r-- 1 root root 21904 Mar  7  2007 /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Params/

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

Question by:imagitastech
    LVL 19

    Assisted Solution

    It could be the permisions are worng for, it needs execution  bits set. Try
    chmod 775 so you get  rwxrwxr-x
    LVL 84

    Accepted Solution

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

    Author Comment

    I tried both setting execute permission to 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


    line 9 is

    use Params::Validate qw(validate_pos);
    LVL 39

    Assisted Solution

    >>How do you modify @INC  to include '/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Params' ?
    You use the statement ozo gave.  Add it to your main program after your "use warnings" line.

    Author Closing Comment

    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.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now