Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on Macos Catalina and Postgres 13 #20

Closed
idkjs opened this issue Aug 30, 2021 · 1 comment
Closed

Installing on Macos Catalina and Postgres 13 #20

idkjs opened this issue Aug 30, 2021 · 1 comment

Comments

@idkjs
Copy link

idkjs commented Aug 30, 2021

Given there not being any other issues asking this, I feel like this might be a dumb question.

Nevertheless, how do I install this extension on macos. I am getting the following error:

...
CREATE EXTENSION
psql:db.init/00-initial-schema.sql:10: ERROR:  could not open extension control file "/Applications/Postgres.app/Contents/Versions/13/share/postgresql/extension/pgjwt.control": No such file or directory

I have tried cloning and installing which seems to work but then when I rerun my script, i get the above error.

~/Github/test/pgjwt master
❯ make install
/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'
/usr/bin/install -c -m 644 .//pgjwt.control '/usr/local/share/postgresql/extension/'
/usr/bin/install -c -m 644 .//pgjwt--0.1.0.sql  '/usr/local/share/postgresql/extension/'

MACHINE SPECS

~/Github/test/pgjwt master                                                                                              3.0.1
❯ postgres -V
postgres (PostgreSQL) 13.3

~/Github/test/pgjwt master                                                                                              3.0.1
❯ sw_vers
ProductName:    macOS
ProductVersion: 11.5.2
BuildVersion:   20G95

Thank you, in advance, for any guidance.

@idkjs
Copy link
Author

idkjs commented Aug 30, 2021

I am guessing it I need to change the install directory based on this output:

❯ psql -d profiles_db -U profiles_admin 
psql (13.3)
Type "help" for help.

profiles_db=# create extension pgjwt
profiles_db-# ;
ERROR:  could not open extension control file "/Applications/Postgres.app/Contents/Versions/13/share/postgresql/extension/pgjwt.control": No such file or directory

Adding this to my fish.config seems to have done the trick.

# Add `pg_config` to path
# https://fishshell.com/docs/current/tutorial.html?highlight=fish_user_path#path
set PG_CONFIG /Applications/Postgres.app/Contents/Versions/latest/bin
fish_add_path $PG_CONFIG

Closing for now. Leaving here for other similarly situated people.

Thank you.

@idkjs idkjs closed this as completed Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant