debugsqlMinor
PostgreSQL CREATE EXTENSION file not found error on Mac OS
Viewed 0 times
postgresqlfileerrorcreateextensionfoundmacnot
Problem
On PostgreSQL 9.2.3 when trying this:
I get this error:
ERROR: could not open extension control file "/opt/local/share/postgresql92/extension/btree_gist.control": No such file or directory
Running
CREATE EXTENSION btree_gist;I get this error:
ERROR: could not open extension control file "/opt/local/share/postgresql92/extension/btree_gist.control": No such file or directory
Running
SELECT pg_available_extensions(); shows that indeed is not available.Solution
The problem is that the needed contrib files are not installed. This was actually the case for several contrib modules.
I found help with the solution to this here:
https://wiki-bsse.ethz.ch/display/ITDOC/Get+PostgreSQL+contrib+modules+on+Mac+OS+X
I suspect reinstalling everything would work too, but this highlights the actual problem.
I found help with the solution to this here:
https://wiki-bsse.ethz.ch/display/ITDOC/Get+PostgreSQL+contrib+modules+on+Mac+OS+X
$ su
# port build postgresql92
# cd `port work postgresql92`/postgresql-/contrib
# for d in *; do test -d $d && ( echo $d; cd $d; make all && make install; cd .. ); doneI suspect reinstalling everything would work too, but this highlights the actual problem.
Code Snippets
$ su
# port build postgresql92
# cd `port work postgresql92`/postgresql-<version>/contrib
# for d in *; do test -d $d && ( echo $d; cd $d; make all && make install; cd .. ); doneContext
StackExchange Database Administrators Q#37391, answer score: 3
Revisions (0)
No revisions yet.