Thread: Postgresql 94 from PostgreSQL RPM Repository (with Yum)

Postgresql 94 from PostgreSQL RPM Repository (with Yum)

From
Steve Clark
Date:
Hi

I installed the following package:
postgresql94-server-9.4.9-1PGDG.rhel6.x86_64
postgresql94-plperl-9.4.9-1PGDG.rhel6.x86_64
postgresql94-plpython-9.4.9-1PGDG.rhel6.x86_64
postgresql94-contrib-9.4.9-1PGDG.rhel6.x86_64
postgresql94-devel-9.4.9-1PGDG.rhel6.x86_64
postgresql94-libs-9.4.9-1PGDG.rhel6.x86_64
postgresql94-9.4.9-1PGDG.rhel6.x86_64

Then tried to build pmacct and the configure complained it couldn't find the libpq library. I looked for
a package-config file for the above but couldn't find one.

What am I missing?

Thanks,
Steve




Re: Postgresql 94 from PostgreSQL RPM Repository (with Yum)

From
Devrim Gündüz
Date:
Hi Steve,

On Thu, 2016-11-10 at 07:56 -0500, Steve Clark wrote:
> 
> I installed the following package:
> postgresql94-server-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-plperl-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-plpython-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-contrib-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-devel-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-libs-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-9.4.9-1PGDG.rhel6.x86_64
>
> Then tried to build pmacct and the configure complained it couldn't find the
> libpq library. I looked for
> a package-config file for the above but couldn't find one.
>
> What am I missing?

Can you please run

export PKG_CONFIG_PATH=/usr/pgsql-9.4/lib/pkgconfig/

and then run configure script again?

Regards,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Attachment

Re: Postgresql 94 from PostgreSQL RPM Repository (with Yum)

From
Adrian Klaver
Date:
On 11/10/2016 04:56 AM, Steve Clark wrote:
> Hi
>
> I installed the following package:
> postgresql94-server-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-plperl-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-plpython-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-contrib-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-devel-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-libs-9.4.9-1PGDG.rhel6.x86_64
> postgresql94-9.4.9-1PGDG.rhel6.x86_64
>
> Then tried to build pmacct and the configure complained it couldn't find
> the libpq library. I looked for
> a package-config file for the above but couldn't find one.
>
> What am I missing?

I just ran the configure on a source installed version of Postgres and it worked.

What it was looking for:

checking whether to enable PostgreSQL support... yes
checking for PGSQL... no
checking default locations for libpq... found in /usr/local/pgsql/lib
checking default locations for libpq-fe.h... found in /usr/local/pgsql/include


And from the configure file:

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking default locations for libpq-fe.h" >&5
$as_echo_n "checking default locations for libpq-fe.h... " >&6; }
        if test -r /usr/include/libpq-fe.h; then
                PGSQL_CFLAGS="-I/usr/include"
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in /usr/include" >&5
$as_echo "found in /usr/include" >&6; }
        elif test -r /usr/include/postgresql/libpq-fe.h; then
                PGSQL_CFLAGS="-I/usr/include/postgresql"
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in /usr/include/postgresql" >&5
$as_echo "found in /usr/include/postgresql" >&6; }
        elif test -r /usr/local/include/libpq-fe.h; then
                PGSQL_CFLAGS="-I/usr/local/include"
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in /usr/local/include" >&5
$as_echo "found in /usr/local/include" >&6; }
        elif test -r /usr/local/pgsql/include/libpq-fe.h; then
                PGSQL_CFLAGS="-I/usr/local/pgsql/include"
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in /usr/local/pgsql/include" >&5
$as_echo "found in /usr/local/pgsql/include" >&6; }
        else
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
                _save_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $PGSQL_CFLAGS"
                ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default"
if test "x$ac_cv_header_libpq_fe_h" = xyes; then :


So it is looking in the default source install locations. The RPMs I believe
install in different locations. Running configure --help shows environment variables
that can be set to change the configure search behavior.


>
> Thanks,
> Steve
>
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com