WeBWorK Main Forum

RHEL 8.4 Upgrade to 2.18 problem (Can't locate Locale/Maketext/Lexicon.pm in @INC )

RHEL 8.4 Upgrade to 2.18 problem (Can't locate Locale/Maketext/Lexicon.pm in @INC )

by L Ng -
Number of replies: 3

Hello folks.

I got all the modules installed as shown in my check_modules.pl test run.

I am using perlbrew with perl 5.39.2 

I tried to start webwork2 and could not start it as it says ..

$> sudo systemctl start webwork2

Job for webwork2.service failed because the control process exited with error code.

See "systemctl status webwork2.service" and "journalctl -xe" for details.

$> journalctl -xe

.......

-- Unit webwork2.service has begun starting up.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: Can't load application from file "/opt/webwork/webwork2/bin/webwork2": Can't locate Locale/Maketext/Lexicon.pm in @INC (you may need to instal>

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/Localize.pm line 5.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: Compilation failed in require at /opt/webwork/webwork2/lib/WeBWorK.pm line 42.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 42.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: Compilation failed in require at /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm line 27.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm line 27.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: Compilation failed in require at (eval 131) line 1.

Sep 03 14:41:17 ccltw3 hypnotoad[57637]: Compilation failed in require at (eval 129) line 1.

Sep 03 14:41:17 ccltw3 systemd[1]: webwork2.service: Control process exited, code=exited status=255

Sep 03 14:41:17 ccltw3 systemd[1]: webwork2.service: Failed with result 'exit-code'.

-- Subject: Unit failed

-- Defined-By: systemd

-- Support: https://access.redhat.com/support

here are my settings:

$> perl -v

perl-5.39.2

$> perl -E 'say for @INC'

/usr/local/perlbrew/perls/perl-5.39.2/bin

/usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2/x86_64-linux

/usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2

/usr/local/perlbrew/perls/perl-5.39.2/lib/5.39.2/x86_64-linux

/usr/local/perlbrew/perls/perl-5.39.2/lib/5.39.2

$> perldoc -l Locale::Maketext::Lexicon

/usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2/Locale/Maketext/Lexicon.pm

$ perldoc -l Mojolicious

/usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2/Mojolicious.pm

$>  ./check_modules.pl

Checking your $PATH for executables required by WeBWorK...

$PATH=      /usr/local/perlbrew/bin

      /usr/local/perlbrew/perls/perl-5.39.2/bin

      /root/.nvm/versions/node/v20.5.1/bin

      /usr/local/texlive/2021/bin/x86_64-linux

      /sbin

      /bin

      /usr/sbin

      /usr/bin

      /usr/local/texlive/2021/bin/x86_64-linux

      /opt/data/webwork/webwork2/bin

      /opt/data/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

   node found at /root/.nvm/versions/node/v20.5.1/bin/node

   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

   pandoc found at /usr/local/perlbrew/perls/perl-5.39.2/bin/pandoc

   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



**The version of node should be 16.  You have version 20

Checking your @INC for modules required by WeBWorK...

@INC=     /usr/local/perlbrew/perls/perl-5.39.2/bin

     /usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2/x86_64-linux

     /usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2

     /usr/local/perlbrew/perls/perl-5.39.2/lib/5.39.2/x86_64-linux

     /usr/local/perlbrew/perls/perl-5.39.2/lib/5.39.2


   Archive::Zip found and loaded

   Array::Utils found and loaded

   Benchmark found and loaded

   Carp found and loaded

   Class::Accessor found and loaded

   Crypt::JWT found and loaded

   Crypt::PK::RSA found and loaded

   Data::Dump found and loaded

   Data::Dumper found and loaded

   Data::Structure::Util 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::Stuffer found and loaded

   Errno found and loaded

   Exception::Class found and loaded

   File::Copy found and loaded

   File::Fetch 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

   Future::AsyncAwait found and loaded

   GD found and loaded

   Getopt::Long found and loaded

   Getopt::Std found and loaded

   HTML::Entities 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

   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

   Math::Random::Secure found and loaded

   Minion found and loaded

   Minion::Backend::SQLite found and loaded

   Mojolicious found and loaded

   Mojolicious::Plugin::NotYAMLConfig found and loaded

   Mojolicious::Plugin::RenderFile 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

   Pandoc found and loaded

   Path::Class found and loaded

   Perl::Tidy found and loaded

   PHP::Serialization found and loaded

   Pod::Simple::Search found and loaded

   Pod::Simple::XHTML 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

   SVG 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

   Types::Serialiser found and loaded

   URI::Escape found and loaded

   UUID::Tiny found and loaded

   XML::LibXML found and loaded

   XML::Parser found and loaded

   XML::Parser::EasyTree found and loaded

   XML::Writer found and loaded

   YAML::XS found and loaded

checking for SQL::Abstract

You have version 1.87 of SQL::Abstract installed.  This will be used

...

What am I doing wrong?




In reply to L Ng

Re: RHEL 8.4 Upgrade to 2.18 problem (Can't locate Locale/Maketext/Lexicon.pm in @INC )

by L Ng -
I am following the docs from these 2 sources and trying to figure it out using Redhat 8.4 version/platform instead.

https://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.18

https://webwork.maa.org/wiki/Installation_Manual_for_2.18_on_Ubuntu

My /etc/systemd/system/webwork2.service looks like this:

[Unit] 

Description=webwork2 

After=network.target 

 

[Service] 

Type=forking 

User=apache 

Group=apache 

RuntimeDirectory=webwork2 

WorkingDirectory=/opt/webwork/webwork2 

PIDFile=/run/webwork2/webwork2.pid 

Environment="MOJO_REVERSE_PROXY=1" 

ExecStart=hypnotoad /opt/webwork/webwork2/bin/webwork2 

ExecReload=hypnotoad /opt/webwork/webwork2/bin/webwork2 

KillMode=process 


 [Install] 

WantedBy=multi-user.target 



In reply to L Ng

Re: RHEL 8.4 Upgrade to 2.18 problem (Can't locate Locale/Maketext/Lexicon.pm in @INC )

by L Ng -

Running this:

$> hypnotoad -f /opt/webwork/webwork2/bin/webwork2

Results in:

Use of @_ in numeric eq (==) with signatured subroutine is experimental at /opt/data/webwork/webwork2/lib/WeBWorK/Controller.pm line 46.

Can't load application from file "/opt//webwork/webwork2/bin/webwork2": Can't locate WeBWorK/PG.pm in @INC (you may need to install the WeBWorK::PG module) (@INC entries checked: /opt/webwork/pg/lib /opt/webwork/webwork2/lib /usr/local/perlbrew/perls/perl-5.39.2/bin /usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2/x86_64-linux /usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2 /usr/local/perlbrew/perls/perl-5.39.2/lib/5.39.2/x86_64-linux /usr/local/perlbrew/perls/perl-5.39.2/lib/5.39.2) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 52.

BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 52.

Compilation failed in require at /usr/local/perlbrew/perls/perl-5.39.2/lib/site_perl/5.39.2/Mojo/Base.pm line 134.

BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Login.pm line 17.

Compilation failed in require at /opt/webwork/webwork2/lib/WeBWorK.pm line 50.

BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 50.

Compilation failed in require at /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm line 27.

BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Mojolicious/WeBWorK.pm line 27.

Compilation failed in require at (eval 131) line 1.

Compilation failed in require at (eval 129) line 1.




In reply to L Ng

Re: RHEL 8.4 Upgrade to 2.18 problem (Can't locate Locale/Maketext/Lexicon.pm in @INC )

by Danny Glin -
For WW2.18 in RHEL8 you don't need a custom version of perl from perlbrew. Mojolicious can be run using the version of perl available from dnf.

For your first issue, check that WW is using the perlbrew version of perl that has all of the modules installed (or better yet, get rid of the perlbrew perl and just use the standard perl).

When running hypnotoad directly from the command line, you are probably running it as a different user than the systemd script. I'm guessing the error about missing modules in this case is because the user doesn't have read permission for the WeBWorK files. Try running 'sudo -u [your_webwork_user] hypnotoad -f /opt/webwork/webwork2/bin/webwork2'