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.
- [root@server libexec]# perl check_pg_connections.pl dev.example.com test_db
- install_driver(Pg) failed: Can't locate DBD/Pg.pm 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 check_pg_connections.pl 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: