WebWork_PerlModules


This article is only about fixing some perl dependacies related issues. (Need to add some more details on installing/upgrading webwork itself.)


1) Check if all the required perl modules are installed. This can be checked using the following command on webwork2. (This saves a lot of effort, instead of checking from the apache logs for the missing modules.)

root@webwork2:~# /opt/webwork/webwork2/bin/check_modules.pl apache2

Checking your $PATH for executables required by WeBWorK…
$PATH=      /usr/local/sbin
      /usr/local/bin
      /usr/sbin
      /usr/bin
      /sbin
      /bin
      /usr/games
      /opt/webwork/webwork2/bin

   mkdir found at /bin/mkdir
   mv found at /bin/mv
   mysql found at /usr/bin/mysql
   tar found at /bin/tar
   gzip found at /bin/gzip
   latex found at /usr/bin/latex
   pdflatex found at /usr/bin/pdflatex
   dvipng found at /usr/bin/dvipng
   tth found at /usr/bin/tth
   giftopnm found at /usr/bin/giftopnm
   ppmtopgm found at /usr/bin/ppmtopgm
   pnmtops found at /usr/bin/pnmtops
   pnmtopng found at /usr/bin/pnmtopng
   pngtopnm found at /usr/bin/pngtopnm

Checking your @INC for modules required by WeBWorK…
@INC=     /etc/perl
     /usr/local/lib/perl/5.14.2
     /usr/local/share/perl/5.14.2
     /usr/lib/perl5
     /usr/share/perl5
     /usr/lib/perl/5.14
     /usr/share/perl/5.14
     /usr/local/lib/site_perl
     .

   Benchmark found and loaded
   Carp found and loaded
   CGI 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
   Email::Address found and loaded
   Errno found and loaded
** Exception::Class not found in @INC
   File::Copy found and loaded
   File::Find 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::Tagset found and loaded
   IO::File found and loaded
** Iterator not found in @INC
** Iterator::Util not found in @INC
   Mail::Sender found and loaded
   MIME::Base64 found and loaded
** Net::IP not found in @INC
   Net::LDAPS found and loaded
   Net::SMTP found and loaded
   Opcode found and loaded
** PadWalker not found in @INC
   PHP::Serialization found and loaded
   Pod::Usage found and loaded
** Pod::WSDL not found in @INC
   Safe found and loaded
   Scalar::Util found and loaded
** SOAP::Lite not found in @INC
   Socket found and loaded
   SQL::Abstract found and loaded
   String::ShellQuote 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
   XML::Parser found and loaded
** XML::Parser::EasyTree not found in @INC
   XML::Writer found and loaded
** XMLRPC::Lite not found in @INC
   Apache2::Request found and loaded
   Apache2::Cookie found and loaded
   Apache2::ServerRec found and loaded
   Apache2::ServerUtil found and loaded
root@webwork2:~#


The perl modules marked ** are required but not found.

2) There are many ways to install perl modules on different environments. However, the easiest way to do it in Ubuntu is perhaps to use the module installer. This is because, manual installations can get complicated when there are multiple dependancies of modules on other modules. The preferred way would be to simply use MCPAN

perl -MCPAN -e shell

On this, use

install <module>

to install the necessary modules inside cspan.

ex. 

  1. install YAML
  2. install Iterator (installs Exception too)
  3. install Iterator::Util

and so on….

3) Once this is done, all the modules are installed.

4) We need to use the old version of the Safe.pm

copy
/usr/share/perl/5.10.1/Safe.pm.ww
to
perl/5.12.4

5) You may want to restart apache 2

service apache2 restart

This should not give any errors on account of dependacies …etc.

Sidebar