install_driver(Pg) failed: Can’t locate DBD/ in @INC

This error message was received when attempting to run an NRPE command from the shell. The fill error is below followed by how the issue was resolved.

The error has been posted on the next page because of its length.

Error Message:

[root@server libexec]# perl test_db
install_driver(Pg) failed: Can't locate DBD/ in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at (eval 3) line 3.
Perhaps the DBD::Pg perl module hasn't been fully installed,
or perhaps the capitalisation of 'Pg' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.
 at line 24

How to Resolve:
All that’s needs to be done here is to install the Perl Postgres database driver which can be completed by issuing the following command.
shell#yum install perl-DBD-Pg

Once installed you should no longer receive the error above.

More information on Perl can be obtained by reading the book below:

Learning Perl, 5th Edition (Paperback)

List Price: $39.99
New From: $15.99 USD In Stock
Used from: $0.01 USD In Stock