Skip to content

Missing libpq.so.X when postgresql installed on non-standard location #146

@ged

Description

@ged

Original report by Edho Arief (Bitbucket: nanayapro, ).


When postgresql is installed on non-standard location (say, /opt/PostgreSQL/9.2), the compile finished without error but raises error when used:

libpq.so.5: cannot open shared object file: No such file or directory (LoadError)

One of the solution I tested to work is by adding

$LDFLAGS << " -Wl,-R%s" % [ `"#{pgconfig}" --libdir`.chomp ]

to the extconf.rb in addition to -I and -L in pgconfig test.

I'm not sure if it's the correct fix (and whether it works with non gcc/linux system).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions