0

I am trying to create a dblink extension on my local machine.

I am using PSQL 9.2.4. I've ran make and make install to install postgres. Went into the contrib folder and ran make and make install in the dblink directory.

dblink is listed in pg_available_extensions table.

However, when I run CREATE EXTENSION dblink; on a database I get the following error:

ERROR:  could not load library "/usr/local/pgsql/lib/dblink.so":   dlopen(/usr/local/pgsql/lib/dblink.so, 10): Symbol not found: _MemoryContextSwitchTo
Referenced from: /usr/local/pgsql/lib/dblink.so
Expected in: /usr/local/pgsql/bin/postgres
in /usr/local/pgsql/lib/dblink.so

I'm not sure how to fix this. I'm quite new to this. Thanks.


SOLUTION

So I had two versions of postgres on my machine and they were conflicting. I removed one of the version but simplying deleting the directory. All is well

LW001
  • 2,452
  • 6
  • 27
  • 36
Hunter
  • 1,667
  • 17
  • 24
  • It has compiled against a different PostgreSQL than the one you installed it into, by the looks. Any chance you used `USE_PGXS` when compiling? That'd do it, if you had a different version installed too. – Craig Ringer Jun 17 '14 at 02:29
  • 1
    You should post your solution as an answer and then accept it :) – carols10cents Aug 27 '14 at 16:20

1 Answers1

0

So I had two versions of postgres on my machine and they were conflicting. I removed one of the version by simply deleting the directory. All is well

Hunter
  • 1,667
  • 17
  • 24