ERROR:
Can’t locate Cpanel/AdvConfig/apache.pm in @INC (you may need to install the Cpanel::AdvConfig::apache module) (@INC contains: /usr/local/cpanel /var/cpanel/cwaf/modules/CPAN/lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0 /opt/cpanel/perl5/528/site_lib/x86_64-linux-64int /opt/cpanel/perl5/528/site_lib) at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/Cpanel.pm line 15.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/Cpanel.pm line 15.
Compilation failed in require at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/if.pm line 15.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/Platform.pm line 16.
Compilation failed in require at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/ClientAPI.pm line 17.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/ClientAPI.pm line 17.
Compilation failed in require at /var/cpanel/cwaf/scripts/updater.pl line 12.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/scripts/updater.pl line 12.
Following is from cpanel support team explaining the reason for the issue…
Thank you for your time and patience while I gathered more information for you.
At this time, I was reviewing this issue and it seems to me that this is related to something that was already observed by one of my teammates.
In short, CWAF appears to depend on cPanel’s Apache distiller system, which was intentionally removed in version 84. This update is shown below in your cPanel Change Logs.
“Fixed case CPANEL-28581: Remove the apache conf distiller system.”
The Apache distiller is an system that was leftover from EasyApache3, and has reached end of life. Comodo themselves must update their plugin so that it does not rely on the old Apache Distiller.
However, based on some other information I could find, most users just prefer to manually install the Comodo WAF Mod_sec rules manually. I believe you might have already done this as well.
Here is How to fix this issue
SSH to your server and go to /var/cpanel/cwaf/tmp/
cd /var/cpanel/cwaf/tmp/
mkdir install
cd install
wget https://waf.comodo.com/cpanel/cwaf_client_install.sh
bash /var/cpanel/cwaf/tmp/install/cwaf_client_install.sh – --update --mode cpanel
cd …
rm -rf install
cd /var/cpanel/cwaf/scripts
./updater.pl
./update-client.pl
After all of these commands successfully issued, go check your CWAF plugin. it should be already updated to the latest version with rulesets and no more error.
[root@masterhost scripts]# ./updater.pl
Can’t locate Cpanel/AdvConfig/apache.pm in @INC (you may need to install the Cpa nel::AdvConfig::apache module) (@INC contains: /usr/local/cpanel /var/cpanel/cwa f/modules/CPAN/lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_ 64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib /usr/loc al/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int /usr/local/cpane l/3rdparty/perl/528/lib/perl5/5.28.0 /opt/cpanel/perl5/528/site_lib/x86_64-linux -64int /opt/cpanel/perl5/528/site_lib) at /var/cpanel/cwaf/modules/CPAN/lib/Como do/CWAF/Cpanel.pm line 15.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CW AF/Cpanel.pm line 15.
Compilation failed in require at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5 .28.0/if.pm line 15.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CW AF/Platform.pm line 16.
Compilation failed in require at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/C lientAPI.pm line 17.
BEGIN failed–compilation aborted at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CW AF/ClientAPI.pm line 17.
Compilation failed in require at ./updater.pl line 12.
BEGIN failed–compilation aborted at ./updater.pl line 12.
@ckeeper – I just want to thank you for posting your very clear instructions in above. I just discovered this error on my server today (no idea how long it has been there - the system is currently running WHM 84.0.15 ).
I was able to find your post here very quickly and your very detailed and clear instructions allowed me to restore full function very quickly.