This repository has been archived by the owner. It is now read-only.

postgresql 9.0.3. on Lion Dev Preview 1 #5004

Closed
theorician opened this Issue Apr 2, 2011 · 20 comments

Comments

@theorician

Fails to install.

Debug output: https://gist.github.com/899987

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 2, 2011

Contributor

It would probably be worth reporting this upstream to Postgresql; there are other issues with Perl 5.12 vs. early versions on other projects too.

Contributor

adamv commented Apr 2, 2011

It would probably be worth reporting this upstream to Postgresql; there are other issues with Perl 5.12 vs. early versions on other projects too.

@theorician

This comment has been minimized.

Show comment
Hide comment
@theorician

theorician Apr 2, 2011

@adamv
Thanks for the quick reply. I will do. In the meanwhile, what can I do to install? I need to get it working on my machine as soon as possible.

@adamv
Thanks for the quick reply. I will do. In the meanwhile, what can I do to install? I need to get it working on my machine as soon as possible.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 2, 2011

Contributor

Try:

brew install postgresql --no-perl
Contributor

adamv commented Apr 2, 2011

Try:

brew install postgresql --no-perl
@caius

This comment has been minimized.

Show comment
Hide comment
@caius

caius Apr 2, 2011

Contributor

It installed ok for me on DP2 last night. Double-check you're on the latest Xcode for Lion and try upgrading to DP2?

Contributor

caius commented Apr 2, 2011

It installed ok for me on DP2 last night. Double-check you're on the latest Xcode for Lion and try upgrading to DP2?

@theorician

This comment has been minimized.

Show comment
Hide comment
@theorician

theorician Apr 2, 2011

I can confirm it works on DP1 with

brew install postgresql --no-perl --no-python

Thanks all.

@caius Yeah, I'll have to upgrade to DP2 soon... This is silly.

I can confirm it works on DP1 with

brew install postgresql --no-perl --no-python

Thanks all.

@caius Yeah, I'll have to upgrade to DP2 soon... This is silly.

@theorician

This comment has been minimized.

Show comment
Hide comment
@theorician

theorician Apr 2, 2011

Hm, postgres doesn't write a socket file (even though it's running) so that I get an error

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Hm, postgres doesn't write a socket file (even though it's running) so that I get an error

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

@benr75

This comment has been minimized.

Show comment
Hide comment
@benr75

benr75 May 23, 2011

I am having the same issue as @theorician. The socket file is there but owned by the _postgres user, while the db dir is owned by my local user. Any help appreciated on DP3

benr75 commented May 23, 2011

I am having the same issue as @theorician. The socket file is there but owned by the _postgres user, while the db dir is owned by my local user. Any help appreciated on DP3

@dmarkow

This comment has been minimized.

Show comment
Hide comment
@dmarkow

dmarkow May 24, 2011

For me, the socket file is at /tmp/.s.PGSQL.5432 (like it was on 10.6). Using ruby and the pg gem, it's trying to look for a socket file in /var/pgsql_socket and failing, whereas in 10.6, it knew to look in /tmp.

dmarkow commented May 24, 2011

For me, the socket file is at /tmp/.s.PGSQL.5432 (like it was on 10.6). Using ruby and the pg gem, it's trying to look for a socket file in /var/pgsql_socket and failing, whereas in 10.6, it knew to look in /tmp.

@dmarkow

This comment has been minimized.

Show comment
Hide comment
@dmarkow

dmarkow May 24, 2011

After digging a little deeper, it looks like 10.7 actually includes PostgreSQL 9.0.4 in it. (Run /usr/bin/pg_config and you'll see all its info). This installation's pg_config_manual.h file defines DEFAULT_PGSOCKET_DIR to be /var/pgsql_socket. However, it doesn't seem to actually run a server instance (pg_ctl doesn't exist), which is why connecting to it fails. Maybe it's just a placeholder for the server OS.

Homebrew's PostgreSQL installs and runs fine. It sets DEFAULT_PGSOCKET_DIR at /tmp. However, you need to make sure that you're running /usr/local/bin/psql to connect (which works), rather than /usr/bin/psql. Also, dependent libraries may need to be told to use this installation too (when I compiled my pg gem, I had to tell it to use /usr/local/bin/pg_config as the --with-pg-config parameter).

Not sure what the process is for resolving conflicts with built-in libraries.

dmarkow commented May 24, 2011

After digging a little deeper, it looks like 10.7 actually includes PostgreSQL 9.0.4 in it. (Run /usr/bin/pg_config and you'll see all its info). This installation's pg_config_manual.h file defines DEFAULT_PGSOCKET_DIR to be /var/pgsql_socket. However, it doesn't seem to actually run a server instance (pg_ctl doesn't exist), which is why connecting to it fails. Maybe it's just a placeholder for the server OS.

Homebrew's PostgreSQL installs and runs fine. It sets DEFAULT_PGSOCKET_DIR at /tmp. However, you need to make sure that you're running /usr/local/bin/psql to connect (which works), rather than /usr/bin/psql. Also, dependent libraries may need to be told to use this installation too (when I compiled my pg gem, I had to tell it to use /usr/local/bin/pg_config as the --with-pg-config parameter).

Not sure what the process is for resolving conflicts with built-in libraries.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Jun 6, 2011

Contributor

However, you need to make sure that you're running /usr/local/bin/psql to connect (which works), rather than /usr/bin/psql.

brew doctor should warn about /usr/bin being ahead of /usr/local/bin in the path.

Contributor

adamv commented Jun 6, 2011

However, you need to make sure that you're running /usr/local/bin/psql to connect (which works), rather than /usr/bin/psql.

brew doctor should warn about /usr/bin being ahead of /usr/local/bin in the path.

@adamv adamv closed this Jun 6, 2011

@raphaelcosta

This comment has been minimized.

Show comment
Hide comment

Thanks!

@mperham

This comment has been minimized.

Show comment
Hide comment
@mperham

mperham Sep 26, 2011

To fix your PATH, just edit /etc/paths and move the /usr/local/bin entry above /usr/bin and restart Terminal.

mperham commented Sep 26, 2011

To fix your PATH, just edit /etc/paths and move the /usr/local/bin entry above /usr/bin and restart Terminal.

@hoolymama

This comment has been minimized.

Show comment
Hide comment
@hoolymama

hoolymama Feb 15, 2012

In my case, I made a symlink from the postgres socket dir in /var to the /tmp dir. I remember a similar issue used to crop up with MySQL

cd /var
rm -r pgsql_socket
ln -s /tmp pgsql_socket
chown _postgres:_postgres pgsql_socket```

In my case, I made a symlink from the postgres socket dir in /var to the /tmp dir. I remember a similar issue used to crop up with MySQL

cd /var
rm -r pgsql_socket
ln -s /tmp pgsql_socket
chown _postgres:_postgres pgsql_socket```
@theorician

This comment has been minimized.

Show comment
Hide comment
@theorician

theorician Feb 15, 2012

Wow, you're still running Dev Preview 1? Maybe you should fix that...

Wow, you're still running Dev Preview 1? Maybe you should fix that...

@ngzax

This comment has been minimized.

Show comment
Hide comment
@ngzax

ngzax Jun 15, 2012

hoolymama's solution above worked for me. Thanks!

ngzax commented Jun 15, 2012

hoolymama's solution above worked for me. Thanks!

@diimdeep

This comment has been minimized.

Show comment
Hide comment
@diimdeep

diimdeep Jun 20, 2012

@hoolymama solution helps!

@hoolymama solution helps!

@dgonzo

This comment has been minimized.

Show comment
Hide comment

dgonzo commented Jun 21, 2012

@hoolymama thanks!

@hoolymama

This comment has been minimized.

Show comment
Hide comment
@hoolymama

hoolymama Jun 21, 2012

Cool - glad to have helped ;)

Cool - glad to have helped ;)

@devjah

This comment has been minimized.

Show comment
Hide comment
@devjah

devjah Oct 8, 2012

@hoolymama's solution worked for me!

devjah commented Oct 8, 2012

@hoolymama's solution worked for me!

@polinom

This comment has been minimized.

Show comment
Hide comment
@polinom

polinom Sep 9, 2013

So one of the simplest solutions is to add export PATH="/usr/local/bin:$PATH" to your .bash_profile

polinom commented Sep 9, 2013

So one of the simplest solutions is to add export PATH="/usr/local/bin:$PATH" to your .bash_profile

@Homebrew Homebrew locked and limited conversation to collaborators Apr 23, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.