This question about Installation of Foswiki: Answered

critical dependencies are missing

First time trying to install Foswiki. Getting stumped on the following error below. I installed Apache 2.4 and ActiverPerl 5.22. This is on a Windows server. What little research I tried to do took me to SPAN modules that maybe need loaded? I downloaded what I thought was the right dependencies from https://metacpan.org/pod/ and dropped them into some of the library locations (C:\www\foswiki\lib, c:\perl64\lib, etc) and that doesn't seem to make a difference.

Error:

** ERROR **

The following critical dependencies are missing from your installation:
... CGI::Session: Can't locate CGI/Session.pm in @INC
... Crypt::PasswdMD5: Can't locate Crypt/PasswdMD5.pm in @INC
... Error: Can't locate Crypt/PasswdMD5.pm in @INC
... File::Copy::Recursive: Can't locate File/Copy/Recursive.pm in @INC

Please install these modules and then ensure all dependencies are installed by either:
- viewing the PerlDependencyReport in your local Foswki, or
- running the CLI shell script tools/dependencies from your server's command line.
You can get a complete list of Perl module dependencies by viewing SystemRequirements
on your local system or at http://foswiki.org/System/SystemRequirements.

Foswiki will not operate correctly unless the required dependencies are installed.

Your current library search path @INC contains:

C:/www/foswiki/lib
C:/Perl64/site/lib
C:/Perl64/lib
.
C:/www/foswiki/lib/CPAN/lib

You can adjust the search path by editing bin/LocalLib.cfg

LocalLib:

# See bottom of file for license and copyright information
#
# LocalLib.cfg: local path settings for Foswiki

# If your shared hosting site uses cPanel, you may need to uncomment the following:
# use cPanelUserConfig;

use vars qw( $foswikiLibPath $CPANBASE );

#development and debugging settings
#$ENV{FOSWIKI_ASSERTS} = 1;
#$ENV{FOSWIKI_MONITOR} = 1;

# -------------- Path to lib directory containing Foswiki.pm.
#
# OPTIONAL
# The absolute path to the 'lib' directory in your installation..
# Windows users: Use forward slash - C:/absolute/path/to/lib
# backslash like C:\ will not work
#
# This setting is typically not required. Foswiki just does the right thing.

$foswikiLibPath = 'C:/www/foswiki/lib';


# -------------- Extra path components to include in @INC
# The actual Foswiki "@INC library path" can be found in the "configure" section
# "Web Server Environment".

# OPTIONAL
# If you need to use perl modules that are not installed in the standard
# directories (e.g. you have downloaded extra modules for use with plugins)
# then you can add the absolute paths to those modules below. You can list
# as many directories as you want, each directory within quotes, and
# directories separated by commas.
#
# Foswiki automatically adds '/path/to/foswiki/lib/CPAN/lib' to the end of
# the @INC path as a last resort for some important modules. If you want them
# to override the system libs, add that path here:

# @localPerlLibPath = ( '/path/to/dir','/path/to/another/dir', );


# OPTIONAL
# If you want to remove some paths from Foswiki @INC (e.g. you put modules
# in different locations and want to quickly move them away while not
# changing e.g. $foswikiLibPath) then add absolute paths to be removed below.
# Do not use this to remove a system wide perl installation in favor of a
# complete local perl installation, but change the shebang line of scripts
# in foswiki/bin and foswiki/tools (see foswiki/tools/rewriteshebang.pl).
# Please note the exact behaviour of "no lib" as described under:
# http://perldoc.perl.org/lib.html#Deleting-directories-from-@INC
# You can list as many directories as you want, each directory within
# quotes, and directories separated by commas.

# no lib ( '/path/to/dir', '/path/to/another/dir', );


# HINTS
# If you prefer to have each path on a single line then you could add a
# linebreak instead of the spaces between the parentheses e.g.:
# <above OPTIONAL setting> (
# '/path/to/dir',
# '/path/to/another/dir',
# );


# http://www.perl.com/pub/a/2002/04/10/mod_perl.html?page=3 has good advice
# on installing CPAN modules without superuser privileges.
# http://sial.org/howto/perl/life-with-cpan/non-root/ also provides a good
# overview and especially mentions additional modules interesting for
# non-root installations (e.g. App::perlbrew, local::lib, App::FatPacker,
# App::cpanminus and other tools).


1; # Required for successful module loading
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/

Copyright (C) 2008-2014 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read LICENSE in the root of this distribution.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

As per the GPL, removal of this notice is prohibited.

-- RobGates - 29 Jan 2016

You are making this too difficult. ActiveState provides simple tools to install CPAN modules into your system. See details on the active state site: http://www.activestate.com/blog/2016/01/installing-cpan-modules-activeperl-518-and-later

Note that we do very little testing on Windows platforms. We recommend running the Foswiki server on Linux when possible.

I don't have a Windows with Active State perl system available to test with, but the following should probably work.

ppm install Algorithm::Diff Apache2::Request Archive::Tar Authen::SASL CGI CGI::Session Crypt::PasswdMD5 Digest::SHA Error Email::MIME Encode File::Copy::Recursive HTML::Parser HTML::Tree IO::Socket::IP IO::Socket::SSL JSON Locale::Maketext Locale::Maketext::Lexicon Locale::Msgfmt LWP URI version 

-- Main.GeorgeClark - 29 Jan 2016 - 16:24

Thanks for the assistance George. I'm installing on a Windows server as we do not currently have a Linux Admin to help administer the box. In any case, the ppm install command helped to install all except "ppm install Error". The install actually went ok and I can even open up the Perl Pkg Manager and it shows there as installed (v 0.17024). However, when I run I still get the error for missing dependency for "Error". Not sure where my disconnect is. Any advice would be helpful.

If I end up needing to scratch it altogether and set it up on Linux, I will. But I'd prefer to try it on Windows first.

-- RobGates - 02 Feb 2016

Could you re-post your error message, Reading the above messages, something is very strange with the message:

... Crypt::PasswdMD5: Can't locate Crypt/PasswdMD5.pm in @INC
... Error: Can't locate Crypt/PasswdMD5.pm in @INC
... File::Copy::Recursive: Can't locate File/Copy/Recursive.pm in @INC

Note that the Error: ... says it cannot locate Crypt/PasswdMD5, repeating data from the prior line.

-- GeorgeClark - 02 Feb 2016

Sorry, I did forget the error. It was:

** ERROR ** The following critical dependencies are missing from your installation: ... Error:

Please install these modules and then ensure all dependencies are installed by either: ......

-- RobGates - 02 Feb 2016

Could you make the following 2-line patch to your bin/setlib.cfg I'm thinking that the check for Error is failing for some other reason and the formatting is masking the error.

diff --git a/core/bin/setlib.cfg b/core/bin/setlib.cfg
index a99bc21..ecd5204 100755
--- a/core/bin/setlib.cfg
+++ b/core/bin/setlib.cfg
@@ -51,6 +51,8 @@ foreach (qw( JSON Error CGI CGI::Session File::Copy::Recursive Crypt::PasswdMD5
 
 if ( scalar %missing ) {
     print "Content-type: text/plain\n\n";
+    use Data::Dumper;
+    print Data::Dumper::Dumper( \%missing );
     print
 "**** ERROR ****\nThe following critical dependencies are missing from your installation:\n";
     foreach my $key ( sort keys %missing ) {

-- GeorgeClark - 02 Feb 2016

Thanks George. I'm not entirely sure what 2-lines you meant, but I backed up the setlib.cfg then took a guess and added the following 2 lines to the setlib.cfg. Once I did that I got the error below.
if ( scalar %missing ) {
    print "Content-type: text/plain\n\n";
    use Data::Dumper;
    print Data::Dumper::Dumper( \%missing );
    print

---------------------------
$VAR1 = {
          'Error' => 'Unmatched ) in regex; marked by <-- HERE in m/";
              document.cookie = cookie;
              document.cookie = cookie + \'; domain=.\'+document.domain;
            }
          }) <-- HERE ;
        </ at C:/www/foswiki/lib/Error.pm line 31.
 at C:/www/foswiki/lib/Error.pm line 31.
   require Error.pm called at (eval 46) line 2
   eval \'require Error\' called at C:/www/foswiki/bin/setlib.cfg line 48
   require C:/www/foswiki/bin/setlib.cfg called at C:/www/foswiki/bin/view line 22
   main::BEGIN() called at C:/www/foswiki/lib/Error.pm line 31
   eval {...} called at C:/www/foswiki/lib/Error.pm line 31
Compilation failed in require at (eval 46) line 2.
 at (eval 46) line 2.
   eval \'require Error\' called at C:/www/foswiki/bin/setlib.cfg line 48
   require C:/www/foswiki/bin/setlib.cfg called at C:/www/foswiki/bin/view line 22
   main::BEGIN() called at (eval 46) line 0
   eval {...} called at (eval 46) line 0
'
        };
**** ERROR ****
The following critical dependencies are missing from your installation:
 ... Error:  

Please install these modules and then ensure all dependencies are installed by either:

-- RobGates - 03 Feb 2016

Okay thanks. Indeed it's a code bug. May take me a bit to figure it out. Right now I don't have a clue. You could try simply deleting that block of code. Remove everthing starting with the line #  Foswiki won't run at all without these: down to just before the line with 1; So the results should look like:
...
# Append lib/CPAN/lib for absolutely needed dependencies
push @INC, "$foswikiLibPath/CPAN/lib";

1;                  # Return success for module loading
...

It may just move the issue to elsewhere, but I don't have a recent windows system to test this on. I'll file a task.

-- GeorgeClark - 03 Feb 2016

Actually the more I look at this. The error reported looks like JavaScript code, which is totally unrelated to the Error.pm module.

Could you look in C:/www/foswiki/lib/Error.pm and verify that it's actually perl code. er... on second though, Error.pm should not even be in that directory. It looks like your distribution got corrupted, possibly when trying to initially install dependencies. Might want to start over.

-- GeorgeClark - 03 Feb 2016

I looked in www/foswiki/lib and indeed error.pm does exist in there.

-- RobGates - 03 Feb 2016
 

QuestionForm edit

Subject Installation of Foswiki
Extension
Version Foswiki 2.0.3
Status Answered
Related Topics Tasks.Item13940
Topic revision: r10 - 07 Feb 2016, GeorgeClark - This page was cached on 01 Jun 2017 - 04:12.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License