SID-02078: Error during do/configure -- Failed to load the perl module CGI qw(:any)
| Status: |
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: |
7 years 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:
- CGI qw(:any) is installed,
- that the module is available on the @INC
path,
- 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:
$CGI::VERSION='4.38';
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
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.