ankane/dexter

Saying HypoPG is not installed?

askl56 opened this issue · 4 comments

Hi,

I've gone through the instructions and installed HypoPG on OSX but when I try to set up the extension in psql i get:

bestmade=# CREATE EXTENSION hypopg ;
ERROR:  could not open extension control file "/Applications/Postgres.app/Contents/Versions/9.6/share/postgresql/extension/hypopg.control": No such file or directory
bestmade=# 

Any ideas?

I've seen this error when HypoPG isn't fully installed. Make sure that sudo make install worked.

/bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/lib/postgresql'
/bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/share/postgresql/extension'
/bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/share/postgresql/extension'
/bin/sh /usr/local/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/Cellar/postgresql/9.6.5/share/doc/postgresql/extension'
/usr/bin/install -c -m 755  hypopg.so '/usr/local/lib/postgresql/hypopg.so'
/usr/bin/install -c -m 644 .//hypopg.control '/usr/local/share/postgresql/extension/'
/usr/bin/install -c -m 644 .//hypopg--1.0.0.sql  '/usr/local/share/postgresql/extension/'
/usr/bin/install -c -m 644 .//README.md '/usr/local/Cellar/postgresql/9.6.5/share/doc/postgresql/extension/'
 /p/t/hypopg-1.0.0                                                                                                                                                                                           114ms  Tue 31 Oct 07:52:42 2017

Looks like it's installing it in a different instance of Postgres on your machine (a Homebrew one). This is determined by the pg_config command.

To add to the above answer, I was struggling to correctly install HypoPG on a machine (actually a docker container) with multiple versions of postgres. I found this solution very helpful:

https://stackoverflow.com/a/43403193/1954610