While setting up munin to monitor postgresql, I was getting "[DBD::Pg not found, and cannot do psql yet]" when running `munin-node-configure --suggest | grep postgres`.
I confirmed that the rpm package "perl-DBI-1.52-2.el5" was indeed installed.
However, when I ran a test against the module, it failed with:
# perl -MDBD::Pg -e 1
Can't load '/usr/lib64/perl5/vendor_ perl/5.8.8/x86_64-linux-thread -multi/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.4: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64- linux-thread-multi/DynaLoader. pm line 230.
at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
On checking the library, it returned with "libpq.so.4 => not found":
# ldd /usr/lib64/perl5/vendor_perl/5 .8.8/x86_64-linux-thread-multi /auto/DBD/Pg/Pg.so
linux-vdso.so.1 => (0x00007fffb60bb000)
libpq.so.4 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007fa36d2c2000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa36d845000)
Indeed libpq.so.4 was missing since postgresql90-libs was installed which only includes "libpq.so.5".
To get libpq.so.4, "compat-postgresql-libs" package needed to be installed.
Once installed the perl module test passed and I was able to get the munin plugins linked using:
# munin-node-configure --shell | grep postgres | sh
- sandip's blog
- Login or register to post comments
Comments
I hit this problem. Adding the ubuntu package "libdbd-pg-perl" fixed it for me (discovered at https://bugs.launchpad.net/ubu ntu/+source/munin/+bug/390617 )