CGI/Fast.pm module is missing in the RHEL 9

Solution Verified - Updated -

Issue

After updating from RHEL 7 to RHEL 9, the perl FastCGI scripts are failing with following error. The perl-CGI, perl-FCGI and mod_fcgid packages are installed.

Can't locate CGI/Fast.pm in @INC (you may need to install the CGI::Fast module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /var/www/cgi-bin/index.fcgi line 7.
BEGIN failed--compilation aborted at /var/www/cgi-bin/index.fcgi line 7.
[fcgid:warn] [pid 40194:tid 40283] (104)Connection reset by peer: [client ::1:54326] mod_fcgid: error reading data from FastCGI server
[core:error] [pid 40194:tid 40283] [client ::1:54326] End of script output before headers: index.fcgi

The scripts use CGI:Fast as below:

#!/usr/bin/perl

use strict;

use CGI::Fast;

while ( my $q = new CGI::Fast() ) {

Environment

Red Hat Enterprise Linux (RHEL) 9.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content