SID-01021: Why TWiki can't locate a module that is already in the @INC
?
| Status: |
Answered |
TWiki version: |
5.0.0 |
Perl version: |
5.8.8 |
| Category: |
CategoryError |
Server OS: |
RHEL 5 |
Last update: |
15 years ago |
Hi guys,
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: Here is the full error (the same appears in apache error log).
Software error:
Can't locate Net/LDAP.pm in @INC (@INC contains: /usr/local/apache2/htdocs/twiki5_pdc/lib . /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 /usr/local/apache2/htdocs/twiki5_pdc/lib/CPAN/lib /usr/lib64/perl5 /usr/lib/perl5/site_perl/5.8.8 /usr/local/apache2/htdocs/twiki5_pdc/lib/CPAN/lib//arch /usr/local/apache2/htdocs/twiki5_pdc/lib/CPAN/lib//5.8.8/x86_64-linux-thread-multi /usr/local/apache2/htdocs/twiki5_pdc/lib/CPAN/lib//5.8.8 /usr/local/apache2/htdocs/twiki5_pdc/lib/CPAN/lib/) at /usr/local/apache2/htdocs/twiki5_pdc/lib/TWiki/Contrib/LdapContrib.pm line 21.
BEGIN failed--compilation aborted at /usr/local/apache2/htdocs/twiki5_pdc/lib/TWiki/Contrib/LdapContrib.pm line 21.
Compilation failed in require at /usr/local/apache2/htdocs/twiki5_pdc/lib/TWiki/LoginManager/LdapApacheLogin.pm line 22.
BEGIN failed--compilation aborted at /usr/local/apache2/htdocs/twiki5_pdc/lib/TWiki/LoginManager/LdapApacheLogin.pm line 22.
Compilation failed in require at (eval 15) line 3.
For help, please send mail to the webmaster (
root@localhost), giving this error message and the time and date of the error.
--
MikeMokkas - 2010-11-10
Discussion and Answer
Possibly more than one Perl installation in your system? Do a
which perl and compare that to the shebang line in
twiki/bin/view.
--
PeterThoeny - 2010-11-10
which perl returned :
/usr/bin/perl and the shebang line of
twiki/bin/view is:
#!/usr/bin/perl -wT .
--
MikeMokkas - 2010-11-16
Editted: I noticed a dot between the first path and the rest of them, is it correct syntactically?Also in the later paths there are some double slashes // , is that also intended?
--
MikeMokkas - 2010-11-16
Dot means current directory; double slashes are OK on Unix/Linux.
Check if
Net/LDAP.pm is really in the
@INC path, and check if the dirs and files are readable by the webserver user.
--
PeterThoeny - 2010-11-16
ok I think its ok now, it seems to work, the reason was most probably the fact that I was installing the perl modules as root and probably apache/twiki couldn't read them. Thanks for the help
--
MikeMokkas - 2010-11-18
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.