tried to restart httpd 2.4 on rhel 8 and got this
Can't locate DateTime.pm in @INC (you may need to install the DateTime module)
#> cpanm Date::Parse
Date::Parse is up to date. (2.33)
what is wrong?
cpanm DateTime
mine is already installed thought
#> cpanm DateTime
DateTime is up to date. (1.54)
all modules as well
$> check_modules.pl apache2
Checking your $PATH for executables required by WeBWorK...
$PATH= /usr/local/perlbrew/bin
/usr/local/perlbrew/perls/perl-5.20.3/bin
/usr/local/texlive/2021/bin/x86_64-linux
/sbin
/bin
/usr/sbin
/usr/bin
/usr/local/texlive/2021/bin/x86_64-linux
/opt/webwork/webwork2/bin
convert found at /bin/convert
curl found at /bin/curl
dvisvgm found at /usr/local/texlive/2021/bin/x86_64-linux/dvisvgm
mkdir found at /bin/mkdir
mv found at /bin/mv
mysql found at /bin/mysql
tar found at /bin/tar
git found at /bin/git
gzip found at /bin/gzip
latex found at /usr/local/texlive/2021/bin/x86_64-linux/latex
pdf2svg found at /bin/pdf2svg
pdflatex found at /usr/local/texlive/2021/bin/x86_64-linux/pdflatex
dvipng found at /usr/local/texlive/2021/bin/x86_64-linux/dvipng
giftopnm found at /bin/giftopnm
ppmtopgm found at /bin/ppmtopgm
pnmtops found at /bin/pnmtops
pnmtopng found at /bin/pnmtopng
pngtopnm found at /bin/pngtopnm
Checking your @INC for modules required by WeBWorK...
@INC= /usr/local/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/x86_64-linux-thread-multi
/usr/local/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3
/usr/local/perlbrew/perls/perl-5.20.3/lib/5.20.3/x86_64-linux-thread-multi
/usr/local/perlbrew/perls/perl-5.20.3/lib/5.20.3
.
Archive::Zip found and loaded
Array::Utils found and loaded
Benchmark found and loaded
Carp found and loaded
CGI found and loaded
CGI::Cookie found and loaded
Class::Accessor found and loaded
Data::Dump found and loaded
Data::Dumper found and loaded
Data::UUID found and loaded
Date::Format found and loaded
Date::Parse found and loaded
DateTime found and loaded
DBD::mysql found and loaded
DBI found and loaded
Digest::MD5 found and loaded
Digest::SHA found and loaded
Email::Address::XS found and loaded
Email::Sender::Simple found and loaded
Email::Sender::Transport::SMTP found and loaded
Email::Simple found and loaded
Errno found and loaded
Exception::Class found and loaded
File::Copy found and loaded
File::Find found and loaded
File::Find::Rule found and loaded
File::Path found and loaded
File::Spec found and loaded
File::stat found and loaded
File::Temp found and loaded
GD found and loaded
Getopt::Long found and loaded
Getopt::Std found and loaded
HTML::Entities found and loaded
HTML::Scrubber found and loaded
HTML::Tagset found and loaded
HTML::Template found and loaded
HTTP::Async found and loaded
IO::File found and loaded
IO::Socket::SSL found and loaded
Iterator found and loaded
Iterator::Util found and loaded
JSON found and loaded
Prototype mismatch: sub main::encode_json ($) vs ($;$) at /usr/local/perlbrew/perls/perl-5.20.3/lib/5.20.3/Exporter.pm line 66.
at (eval 438) line 2.
Prototype mismatch: sub main::decode_json: none vs ($;$$) at /usr/local/perlbrew/perls/perl-5.20.3/lib/5.20.3/Exporter.pm line 66.
at (eval 438) line 2.
JSON::MaybeXS found and loaded
Locale::Maketext::Lexicon found and loaded
Locale::Maketext::Simple found and loaded
LWP::Protocol::https found and loaded
MIME::Base64 found and loaded
Net::IP found and loaded
Net::LDAPS found and loaded
Net::OAuth found and loaded
Net::SMTP found and loaded
Net::SSLeay found and loaded
Opcode found and loaded
PadWalker found and loaded
Path::Class found and loaded
PHP::Serialization found and loaded
Pod::Usage found and loaded
Pod::WSDL found and loaded
Safe found and loaded
Scalar::Util found and loaded
SOAP::Lite found and loaded
Socket found and loaded
Statistics::R::IO found and loaded
String::ShellQuote found and loaded
Template found and loaded
Text::CSV found and loaded
Text::Wrap found and loaded
Tie::IxHash found and loaded
Time::HiRes found and loaded
Time::Zone found and loaded
URI::Escape found and loaded
UUID::Tiny found and loaded
XML::Parser found and loaded
XML::Parser::EasyTree found and loaded
XML::Simple found and loaded
XML::Writer found and loaded
XMLRPC::Lite found and loaded
YAML found and loaded
Apache2::Request found and loaded
Apache2::ServerRec found and loaded
Apache2::ServerUtil found and loaded
checking for SQL::Abstract
You have version 1.87 of SQL::Abstract installed. This will be used
[root@srv]# cpanm DateTime
DateTime is up to date. (1.54)
your @INC isn't pointing to the perlbrew version of perl. It's unclear to me why that might be the case. You have perlbrew enabled in your ~/.bashrc?
Maybe try enabling perlbrew for all users:
See if that helps the apache daemon find the right perl to use...
Yup/// already have and still that error.. I don't get it
...
-- Unit httpd.service has begun starting up.
Jul 23 20:49:05 srvA httpd[455019]: AH00526: Syntax error on line 48 of /etc/httpd/conf.d/webwork.conf:
Jul 23 20:49:05 srvA httpd[455019]: Can't locate DateTime.pm in @INC (you may need to install the DateTime module) (@INC contai>
Jul 23 20:49:05 srvA systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jul 23 20:49:05 srvA systemd[1]: httpd.service: Failed with result 'exit-code'.
line 48 in the webwork.conf is this
47 <Perl>
48
49 #########################################################
without the quote.
What you're experiencing sounds familiar, and I'm pretty sure that I ran into this situation when I was working on the wiki instructions. I didn't end up finding my way out of it, and instead restarted the installation process. Things to keep in mind:
or maybe if I was "smart" I would just go with ubuntu instead lol
how can I start from scratch by deleting the modules properly? the only force I had to do was for DBD:MYSQL I believe.. can't remember so long ago
I even changed the bash_profile that when I log in, it shows me the current perl version in the CLI and it is 5.20.3$>
perl-5.20.3$> perl -le'use DateTime; print $INC{"DateTime.pm"}'
/usr/local/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/x86_64-linux-thread-multi/DateTime.pm
I solved that by adding a redhat8 repository similar to PowerTools on CentOS. On RHEL 8 we have the CodeReady Builder repository ... but that created more problems like missing
$> sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
$> yum install "perl(DateTime)"
$> yum install "perl(HTML::Scrubber)"
$> yum install "perl(Locale::Maketext)"
DateTime (fixed)
HTML::Scrubber (fixed)
Locale::Maketext (fixed)
Locale::Maketext:: Lexicon (stuck here)
$> yum install "perl(Locale::Maketext::Lexicon)"
Updating Subscription Management repositories.
Last metadata expiration check: 2:10:18 ago on Sat 24 Jul 2021 10:08:24 AM PDT.
No match for argument: perl(Locale::Maketext::Lexicon)
Error: Unable to find a match: perl(Locale::Maketext::Lexicon)
Yet....
$> cpanm Locale::Maketext::Lexicon
Locale::Maketext::Lexicon is up to date. (1.00)
ln -s /opt/webwork/webwork2/conf/webwork.apache2.4-config /etc/httpd/conf.d/webwork.confI am trying to start the apache, but I am getting the
@INC:
/opt/webwork/webwork2/lib
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5
/etc/httpd
Maybe try 'find'ing the DateTime.pm module? `find /usr -name DateTime.pm`
I ran 'find /usr -name DateTime.pm`
and I was able to see it at:
/usr/local/perlbrew/perls/perl-5.20.3/lib/site_perl/5.20.3/x86_64-linux-thread-multi/DateTime.pm
What could be the reason 'webwork.conf' is not able to find it and throwing the syntax error as shared in the previous post?
Thanks for the help in advance.
Based on the @INC as you shared above, your system is not looking in /usr/local/perlbrew/... for modules.
Keep in mind, there's the 'system' perl, and then there's the various installation(s) of perl that you're managing with perlbrew. It seems that apache (via mod_perl) is using the system perl (and it's subdirectories -- as evidenced in the "@INC includes:" in the error message above) rather than perlbrew.
Is it possible that you have not enabled perlbrew for the root user? (I'm trying to figure out why your apache restarts are not using the perlbrew-installed version of perl.)
In order to be persistent, the last line (`source /usr/local/perlbrew/etc/bashrc`) needs to be added to the `.bashrc` file for the wwadmin user: /home/wwadmin/.bashrc; and should also be added for the root user as well.
Yes, the problem is that you installed mod_perl via yum.
It should instead be installed with cpanminus after having compiled your own perl with perlbrew.
https://webwork.maa.org/wiki/Installation_Manual_for_2.16_on_RHEL8#Installing_Perl_Modules
I do not know how cleanly it will work to uninstall the system-mod_perl and re-install with `cpanm mod_perl2` -- but that is what needs to happen. (When working on this installation guide, I tried many means of getting mod_perl installed in RHEL8 -- the only reason this guide has you install perlbrew and a custom perl is precisely to get mod_perl working.)
I had to start from scratch and now I have successfully built the server on oracle linux!!
Thanks for your constructive suggestions Prof Parker.
Glad to hear it! I can't tell you how many times I had to start from scratch in the process of developing those instructions... it's not pleasant, but sometimes it's the only way.