Stops at PG installation on Mavericks #182

Closed
geoffharcourt opened this Issue Jan 8, 2014 · 5 comments

Projects

None yet

4 participants

Contributor

Brand new Macbook, script stops after PG installation at the point where the pg is started:

initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".
failed

Script proceeds along successfully after I rm -rf /usr/local/var/postgres and rerun laptop again.

Contributor
adarsh commented Jan 9, 2014

I also had this issue on a laptop setup.

Contributor
pbrisbin commented Jan 9, 2014

What should the behavior be? Does this mean Mavericks is shipping with postgres now?

Owner
jferris commented Jan 9, 2014

OS X started shipping Postgres with Lion. I'm not totally sure if it still is, but I really doubt that the built-in version uses /usr/local/var/postgres. It's possible that something earlier in the laptop script is somehow initializing that directory, or that we're trying to setup postgres twice.

Contributor
pbrisbin commented Jan 9, 2014

It looks like the postgres formula runs initdb. I would guess that's a recent addition and when we try to run it ourselves (as may have been previously required) we get this error. I say we remove our initdb line, or at least make it conditional.

Owner
jferris commented Jan 9, 2014

We run brew update, so we can rely on having the latest formulae. That means that it should be safe to just remove the initdb line.

@pbrisbin pbrisbin added a commit that closed this issue Jan 9, 2014
@pbrisbin pbrisbin Remove initdb, fixes #182
The latest Homebrew formula runs this as part of post-install.
eeb2dc0
@pbrisbin pbrisbin closed this in eeb2dc0 Jan 9, 2014
@jt14den jt14den pushed a commit to ucsdlib/laptop that referenced this issue Nov 3, 2016
@pbrisbin pbrisbin Remove initdb, fixes #182
The latest Homebrew formula runs this as part of post-install.
ede7b3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment