recently I was installing some perl modules on my RHEL 5 with perl version 5.8.8 and all instalations went fine. I can see that the modules exist in the @INC but my TWiki site claims that it can't find them returning an error: Can't locate Net/LDAP.pm in @INC (a lot of paths which contain the modules) at TWiki.pm line xx. When I do perl -e 'use Net::LDAP';
it doesn't return anything which means perl can find that module. Also TWiki was configured corectly and works fine except the plugins that use specific modules I had to install, I've even added the paths to setLib.cfg just in case.
Edit:
which perl
returns /usr/bin/perl
the shebang line of twiki/cgi-bin/view
is #!/usr/bin/perl -wT
perl -MNet::LDAP -e 'print $INC{"Net/LDAP.pm"}, "\n";'
returns:
/usr/lib/perl5/site_perl/5.8.8/Net/LDAP.pm
apache error logs show: [Tue Nov 16 10:53:47 2010] [error] [client 10.76.14.170] [Tue Nov 16 10:53:47 2010] view: INC /usr/lib/perl5/site_perl/5.8.8 at /usr/local/apache2/htdocs/twiki5_pdc/bin/view line 44.
So it use's the correct path.
@INC is possibly different from your command line - either because you're using a different Perl interpreter binary, or other factors affecting @INC
.
Check command line's @INC
: perl -e 'print join(",", sort @INC);'
- and compare to @INC
printed in your Wiki's error that you mentioned.
You might have to add directories to your web server's Perl's @INC which are present in command line's ("how" depends on whether you're running under mod_perl or not).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With