Ad Widget

Collapse

configure: error: PostgreSQL library not found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • domehead100
    Junior Member
    • Jan 2013
    • 2

    #1

    configure: error: PostgreSQL library not found

    Trying to build Zabbix server from source on Centos 5.8, and during ./configure I get the error:

    configure: error: PostgreSQL library not found

    My configure command:
    Code:
    [zabbix@localhost zabbix-2.0.4]$ ./configure --enable-server --with-postgresql=/usr/pgsql/9.2/bin/pg_config -with-net-snmp --with-ssh2 --with-libcurl
    The path to pg_config is valid:
    Code:
    [root@localhost tmp]# /usr/pgsql-9.2/bin/pg_config --version
    PostgreSQL 9.2.2
    Is it looking for libpq?

    I've installed the Postgres client/devel/libs rpms on the Zabbix host (64-bit versions). Does Zabbix require 32-bit libs?

    Background:

    1) I have PostgreSQL 9.2 server (64-bit) on a separate host from the one where Zabbix server is.

    2) I've installed the Postgres 64-bit client/devel/lib rpms on the Zabbix server machine:
    Code:
    [root@localhost zabbix-2.0.4]# yum list postgres*
    ...
    [B]Installed Packages
    postgresql-libs.i386                                 8.1.23-6.el5_8                            installed
    postgresql-libs.x86_64                               8.1.23-6.el5_8                            installed
    postgresql92.x86_64                                  9.2.2-1PGDG.rhel5                         installed
    postgresql92-devel.x86_64                            9.2.2-1PGDG.rhel5                         installed
    postgresql92-libs.x86_64                             9.2.2-1PGDG.rhel5                         installed[/B]
    Available Packages
    postgresql92-contrib.x86_64                          9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-debuginfo.x86_64                        9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-docs.x86_64                             9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-jdbc.x86_64                             9.2.1002-1PGDG.rhel5                      pgdg92   
    postgresql92-jdbc-debuginfo.x86_64                   9.2.1002-1PGDG.rhel5                      pgdg92   
    postgresql92-odbc.x86_64                             09.01.0200-1PGDG.rhel5                    pgdg92   
    postgresql92-odbc-debuginfo.x86_64                   09.01.0200-1PGDG.rhel5                    pgdg92   
    postgresql92-plperl.x86_64                           9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-plpython.x86_64                         9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-pltcl.x86_64                            9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-server.x86_64                           9.2.2-1PGDG.rhel5                         pgdg92   
    postgresql92-test.x86_64                             9.2.2-1PGDG.rhel5                         pgdg92
    3) I've added a conf file to /etc/ld.so.conf.d for the Postgres libs, and I've run ldconfig to refresh the shared library cache:
    Code:
    [root@localhost ld.so.conf.d]# ll
    total 32
    -rw-r--r-- 1 root root  20 Jan 24 17:42 postgresql9.2.conf
    -rw-r--r-- 1 root root 276 Nov  1 09:45 vmware-tools-libraries.conf
    -rw-r--r-- 1 root root  21 Oct 26 18:07 xulrunner-32.conf
    -rw-r--r-- 1 root root  23 Oct 26 18:06 xulrunner-64.conf
    [root@localhost ld.so.conf.d]# cat postgresql9.2.conf 
    /usr/pgsql-9.2/lib/
    [root@localhost ld.so.conf.d]# ldconfig -v | grep libpq
            libpq.so.5 -> libpq.so.5.5
            libpqwalreceiver.so -> libpqwalreceiver.so
            libpq.so.4 -> libpq.so.4.1
            libpq.so.4 -> libpq.so.4.1
    4) I also tried export LD_LIBRARY_PATH=/usr/pgsql-9.2/lib:$LD_LIBRARY_PATH, and that didn't help.

    Any thoughts on now to resolve this will be greatly appreciated.
  • domehead100
    Junior Member
    • Jan 2013
    • 2

    #2
    Resolved

    Turns out it was a permissions issue on the /usr/pgsql-9.2/lib folder.

    I'm building using a zabbix user that I created, and the zabbix user couldn't access the libs.

    Comment

    Working...