Cpanel Show Current Disk Usage not working

In a Cpanel server running FreeBSD 5.4, Show Current Disk Usage link on WHM is not working. It shows error

Software error:

Can’t locate GD.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.6.2/mach /usr/local/lib/perl5/site_perl/5.6.2 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.6.2/BSDPAN /usr/local/lib/perl5/5.6.2/mach /usr/local/lib/perl5/5.6.2 . /usr/local/cpanel /usr/local/cpanel/whostmgr/docroot/cgi) at ./cgi/diskusage.cgi line 9.
BEGIN failed–compilation aborted at ./cgi/diskusage.cgi line 9.

For help, please send mail to this site’s webmaster, giving this error message and the time and date of the error.

So i checked if GD.pm is installed

server20# locate GD.pm
/usr/local/lib/perl5/site_perl/5.8.6/GD/SecurityImage/GD.pm
/usr/local/lib/perl5/site_perl/5.8.6/mach/GD.pm
server20#

I found it is installed in a different location. The script look at

/usr/local/lib/perl5/5.6.2/

but it is available at

/usr/local/lib/perl5/site_perl/5.8.6/

It seems two version of perl installed on the server, i check installed versions of perl with

server20# pkg_info|grep perl
bsdpan-Archive-Zip-1.16 Unknown perl module
bsdpan-CPAN-1.80 CPAN – query, download and build perl modules from CPAN sit
bsdpan-Expect-1.15 Unknown perl module
bsdpan-IO-Stty-.02 Unknown perl module
bsdpan-Parse-RecDescent-1.94 Unknown perl module
bsdpan-Term-ReadLine-Perl-1.0203 Unknown perl module
bsdpan-TermReadKey-2.30 Term::ReadKey – A perl module for simple terminal control
bsdpan-XML-Parser-2.34 XML::Parser – A perl module for parsing XML documents
bsdpan-libwww-perl-5.803 LWP – The World-Wide Web library for Perl
perl-5.6.2_2 Practical Extraction and Report Language
perl-5.8.6_2 Practical Extraction and Report Language
server20#

So i uninstalled old version of Perl

server20# pkg_delete perl-5.6.2_2
pkg_delete: ‘/usr/local/bin/perl’ fails original MD5 checksum – not deleted.
pkg_delete: couldn’t entirely delete package (perhaps the packing list is
incorrectly specified?)
Removing stale symlinks from /usr/bin…
Removing /usr/bin/perl
Removing /usr/bin/perl5
Skipping /usr/bin/suidperl
Done.
Cleaning up /etc/make.conf… Done.
Cleaning up /etc/manpath.config… Done.
server20#

Now i checked Perl installations

server20# /usr/local/bin/perl -v

This is perl, v5.8.6 built for i386-freebsd-64int
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl’ or `perldoc perl’. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

server20# /usr/bin/perl -v
/usr/bin/perl: Command not found.

/usr/bin/perl is not available, so i created a symlink to it.

server20# ln /usr/local/bin/perl /usr/bin/perl
server20# /usr/bin/perl -v

This is perl, v5.8.6 built for i386-freebsd-64int
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl’ or `perldoc perl’. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

server20#

Now everything is working fine.


Posted in Cpanel Server, FreeBSD. Bookmark the permalink.