Desert Crystal Solutions

Menu

Solution: CSF Install on CentOS 5/6 with Missing Perl Libraries

Monday, 03 September 2012 23:54

If you're in the CentOS sysadmin game, then chances are you've heard of CSF (ConfigServer & Security Firewall).  
It's one of those amazing gems of coding that makes setting up a Linux server that much easier, giving your server or cluster that added protection with simplier controls, via good old iptables.  With it you can setup your server's firewall in confidence in under a minute, where without it, it could take hours to anything close to what CSF does all for you.

If you're getting an error trying to install CSF, then it means you're missing some required perl dependancies that need to be installed.

Installing CSF onto a new CentOS server usually will result in the following error:

Checking Perl modules...
Can't locate LWP/UserAgent.pm in @INC (@INC contains: /etc/csf /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/p
erl5 /usr/share/perl5 .) at (eval 22) line 2.
BEGIN failed--compilation aborted at (eval 22) line 2.

Can't locate Time/HiRes.pm in @INC (@INC contains: /etc/csf /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl
5 /usr/share/perl5 .) at (eval 27) line 2.
BEGIN failed--compilation aborted at (eval 27) line 2.

 

And the solution? A simple one-liner:

yum install -y perl-libwww-perl perl-Time-HiRes

 

If you like CSF, make a donation to Jonathan for this awesome application!

" type="text/javascript"> --); ?>