Search code examples
perlapachecentosperl-modulemod-perl

Perl error: Can't locate XFileConfig.pm in @INC


I'm trying to install a Perl script in my server. When I received Server access.

I installed apache2, mod_perl, activated mod_rewrite in var/www/html

when I try to execute install.cgi I get the following error:

[Wed Jun 20 21:09:36 2012] [error] Can't locate XFileConfig.pm in @INC (@INC contains: . /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 /etc/httpd) at /var/www/cgi-bin/install.cgi line 4.\nBEGIN failed--compilation aborted at /var/www/cgi-bin/install.cgi line 4.\n

I'm under Centos 5, Perl v5.8.8


Solution

    1. Ensure that you have XFileSharing installed.
    2. Locate the path where lib for XFileSharing are installed. You can use following command to locate XFileConfig.pm

      updatedb
      locate XFileConfig.pm    
      
    3. Add following line at top of your perl script.

      use lib '<path>';