Thread: Error Creating DBlink Extension in 9.4.1

Error Creating DBlink Extension in 9.4.1

From
"Nykolyn, Andy (AS)"
Date:

I get the following error in my 9.4.1 database when I issue the command:

 

Create extension dblink;

 

ERROR:  could not load library "/usr/local/pgsql941/lib/dblink.so": /usr/local/pgsql941/lib/dblink.so: undefined symbol: PQsetSingleRowMode

 

Is this a bug or did I do something wrong?  Any help would be greatly appreciated.  Thanks

 

Andrew Nykolyn

Northrop Grumman

Re: Error Creating DBlink Extension in 9.4.1

From
Tom Lane
Date:
"Nykolyn, Andy (AS)" <andrew.nykolyn@ngc.com> writes:
> I get the following error in my 9.4.1 database when I issue the command:
> Create extension dblink;

> ERROR:  could not load library "/usr/local/pgsql941/lib/dblink.so": /usr/local/pgsql941/lib/dblink.so: undefined
symbol:PQsetSingleRowMode 

> Is this a bug or did I do something wrong?  Any help would be greatly appreciated.  Thanks

It looks like dblink.so is getting linked to an old version of libpq.so
(very old, like pre-9.2).  Probably that's whatever is in /usr/lib.
If you don't want to update /usr/lib, you'll need to rebuild with an
"rpath" pointing at the installation location for 9.4.  (Note that PG
usually is built with rpath pointing at whatever configure was told the
installation location would be; so you might have brought this on yourself
by relocating the directory tree from its initial location.)

            regards, tom lane