0

I'm trying to push my local postgres db to heroku and I get the following SSL error:

psql: sslmode value "require" invalid when SSL support is not compiled in

I uninstalled postgres and reinstalled it with the configuration

./configure --with-includes=/usr/local/ssl/include

I also changed the ssl setting in my postgresql.conf file to "on" and sent a SIGHUP signal to the server and still get the same error.

Is there something I'm overlooking? I don't think it should be this difficult to push to heroku.

Brosef
  • 2,945
  • 6
  • 34
  • 69
  • Please see the reason answered at: http://stackoverflow.com/a/36201845/6723862. – Kristo Mägi Sep 01 '16 at 21:21
  • And in case you're running on OSX then for less headache and more for your convenience check out: http://postgresapp.com/ :) – Kristo Mägi Sep 01 '16 at 21:25
  • @KristoMagi I did see that answer. I thought reinstalling postgres and configuring my setup with `./configure --with-includes=/usr/local/ssl/include` would result in my `libpq` library being configured correctly to work with openssl. – Brosef Sep 01 '16 at 21:30
  • Might be then that you need to add `--with-openssl` and `--with-includes=/usr/local/ssl/include/openssl` flag – NB: check also folders. For another question what OS are you running and what did you use to install Postgres? – Kristo Mägi Sep 01 '16 at 21:40
  • @KristoMagi I'm using OS X. I installed postgres by downloading the source and following the instructions in the documentation. I tried configuring my install by doing `--with-openssl` but got the error "configure: error: header file is required for OpenSSL". So i tried the solution here: https://www.postgresql.org/message-id/5627D2A2.1020904@joeconway.com – Brosef Sep 01 '16 at 21:43
  • Then maybe you want to try the PostgresApp as I commented before :) – Kristo Mägi Sep 01 '16 at 21:52
  • I might resort to it. But it would be nice to find out why I can't get this to work. – Brosef Sep 01 '16 at 23:27
  • Understandable. Just to confirm – are your sure your openssl is at `/usr/local/..` ? – Kristo Mägi Sep 01 '16 at 23:48
  • I just ran `openssl version -d` and the output was OPENSSLDIR: "/System/Library/OpenSSL" ... – Brosef Sep 01 '16 at 23:51
  • Ack, that's where it stores stuff. But you may want to look into `/usr/local/Cellar/openssl/[Some version number]/include/openssl/` when setting Postgres conf flags. – Kristo Mägi Sep 02 '16 at 00:23
  • Found it. `/usr/local/Cellar/openssl/1.0.2f/include/openssl`. So you suggest configuring postgres by doing `./configure --with-openssl --with-includes=/usr/local/Cellar/openssl/1.0.2f/include/openssl`? – Brosef Sep 02 '16 at 00:30

0 Answers0