fidividi

Well-Known Member
Feb 15, 2013
48
0
56
cPanel Access Level
Root Administrator
Hello,

On one of our servers, SpamScan cronjob is panicking with below details:

Subject: "Cron <[email protected]> /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.php"

Email body:



Code:
Can't locate Net/DNS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
Can't locate Net/DNS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
Can't locate Net/DNS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
Can't locate Net/DNS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
Can't locate Net/DNS.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/cgi/spamscan/spamscan_cron.pl line 2.

Can you please help us?


Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

Please see:

Internal Perl Modules

Try installing that Perl module via:

Code:
/scripts/perlinstaller Net::DNS
If it's already installed, please let us know if you see any output when running:

Code:
/usr/local/cpanel/3rdparty/bin/perl -V|grep PERL5LIB
set | grep PERL
Thank you.
 

smartrange

Registered
Jul 29, 2012
4
1
3
cPanel Access Level
Reseller Owner
Hello,
I seem to have the same issue with the "Can't locate Net/DNS.pm in @INC" error.

When I run /usr/local/cpanel/3rdparty/bin/perl -V|grep PERL5LIB
I see
PERL5LIB="/home/username/perl5/lib/perl5"

Looks like the wrong directory. How can this be fixed please?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
When I run /usr/local/cpanel/3rdparty/bin/perl -V|grep PERL5LIB
Hello,

You can try running the following command to address this issue:

Code:
unset PERL5LIB
Thank you.