Installation

A perl problem - module not found when restarting httpd

A perl problem - module not found when restarting httpd

by Alasdair McAndrew -
Number of replies: 3
I'm attempting to install WebWork (from the git repositories) on a new RHEL 5.9 server. I've followed all the instructions from http://webwork.maa.org/wiki/Github as well as I can. However, when I attempt to restart the httpd daemon, I get a raft of errors of which the first is:
Syntax error on line 45 of /opt/webwork/webwork2/conf/webwork.apache2-config: Can't locate Locale/Maketext/Lexicon.pm in @INC
I am using ActivePerl 5.16 (which I have placed first in my path so that the shell uses this rather than the old perl 5.8.8).

Now, when I run "./check-modules.pl apache2" it claims that
Locale::Maketext::Lexicon found and loaded
However, if I check the directory

/opt/ActivePerl-5.16/lib/Locale/Maketext

then the module Lexicon.pm is not there! Although I'm a fairly confident Linux user, I have very little experience in web server maintenance, and in the use of Perl, so I'm a little confused. Oh, and "cpan Locale::Maketext::Lexicon" returns
Locale::Maketext::Lexicon is up to date (0.96)
Any help would be gratefully received!

Thanks,
Alasdair
In reply to Alasdair McAndrew

Re: A perl problem - module not found when restarting httpd

by Alasdair McAndrew -
I've discovered a bit more; for some reason the WebWork2 scripts are still looking for libraries relating to the old perl 5.8.8. Here are two perl commands on my system:

perl -le 'print foreach @INC'

which produces:

/opt/ActivePerl-5.16/site/lib
/opt/ActivePerl-5.16/lib
.


and

env -i perl -V

which produces:

@INC:
/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


I think that it's in these libraries in which the webwork scripts are looking in vain. Does anybody know if I can get WebWork2 to work with ActivePerl 5.16?

Thanks!
In reply to Alasdair McAndrew

Re: A perl problem - module not found when restarting httpd

by Michael Gage -
Just a guess, but try using 

perl -MCPAN -e "shell"

and then 

install Locale::Maketext::Lexicon

see if that puts the Lexicon module in the /opt/ActivePerl  directory.


Daryl Tingley <daryl@unb.ca> was also having troubles using RHEL 5 (actually it's perl 5.8.8 that causes most of the trouble).  

For debugging reference -- one problem might be with the code setting up the maketext() module at line 23 of WeBWorK/Localize.pm  or a missing module or something else we haven't thought of.



has all of the references to // taken out (this is the feature that 5.8.8 can't handle)

Get in touch with Tingly and report back if you can figure out a fix for this for those using RHEL5 

-- Mike

In reply to Michael Gage

Re: A perl problem - module not found when restarting httpd

by Alasdair McAndrew -
What I'm doing now is compiling mod_perl from source using the ActivePerl and apache2 libraries and scripts. Hopefully this should alleviate many of the problems... I'll let you know how it goes. (Phew: it's a lot of work, though!)