create new tag
, view all tags

SID-02078: Error during do/configure -- Failed to load the perl module CGI qw(:any)

Status: Answered Answered TWiki version: 6.0.1 Perl version: 5.10.1
Category: CategoryInstallation Server OS: Red Hat Enterprise Linux Server release 6.6 (Santiago) Last update: 48 minutes ago

Hi I'm trying to install TWiki 6.0.1 on Linux RHEL6.5 perl version 5.10.1.

When I run perl -e 'use CGI; print $CGI::VERSION."\n"' shows version 4.21.

The error I see is below:

Failed to load the perl module CGI qw(:any). The module could not be found.

Please ensure that:

  1. CGI qw(:any) is installed,
  2. that the module is available on the @INC path,
  3. that the webserver user (root) has permission to read the CGI qw(:any).pm file.
The detailed error seen was: CGI -any pragma has been REMOVED. You should audit your code for any use of none supported / incorrectly spelled tags and remove them at /usr/local/share/perl5/CGI.pm line 925. BEGIN failed--compilation aborted at (eval 6) line 2.

From the required packages I believe

-- TWiki Guest - 2015-06-28

Discussion and Answer

This is a duplicate of SID-02079.

-- Peter Thoeny - 2015-06-28

This could be related to the CGI version issue on newer OSes; a new extension is now available that addresses the CGI issue: CgiContrib - for background see AddCGIpmToTWikiCore.

-- Peter Thoeny - 2015-10-28

As mentioned in the CgiContrib topic, the CgiContrib solution doesn't work with TWiki versions lower than 6.0.2. I had this issue on my Ubuntu 10.04.4 LTS and solved it as follows.

Apparently, TWiki only allows a CGI.pm file lower than 4.04 (http://twiki.org/cgi-bin/view/Support/SID-02079).

So I checked the CGI.pm file in the location mentioned in the error (/usr/share/perl/5.10, which is a symbolic link to /usr/share/perl/5.10.1), and saw the following version number:


You can also check the version of the CGI.pm file by issuing the following command:

perl -e 'use CGI; print $CGI::VERSION."\n"'

Since I have TWiki 6.0.1 (in the past, I successfully updated from 4.3 to 6.0.1, but I was not able to update it the 6.0.1 to 6.0.2...), the CGI Contrib Package solution (http://twiki.org/cgi-bin/view/Plugins/CgiContrib) was no option.

Since I had installed perl 5.12 alongside the default perl 5.10 on Ubuntu 10.04, I looked for the verison of the CGI.pm included with that perl version. It appeared to be 3.48, which is good for TWiki.

I downloaded the 3.48 release of CGI.pm from: http://search.cpan.org/~lds/CGI.pm-3.48/ and uncompressed it.

In /usr/share/perl/5.10.1, I renamed CGI.pm file to CGI438.pm and the CGI folder to CGI438.

Then I copied the contents of the lib subfolder of the uncompressed downloaded CGI to /usr/share/perl/5.10.1.

Afterwards, I was able again to reach the configure page of TWiki.

-- Stijn Bousard - 2018-03-02

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Status Answered
Title Error during do/configure -- Failed to load the perl module CGI qw(:any)
SupportCategory CategoryInstallation
TWiki version 6.0.1
Server OS Red Hat Enterprise Linux Server release 6.6 (Santiago)
Web server Apache 2.2.15
Perl version 5.10.1
Browser & version ALL
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2018-03-02 - StijnBousard
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.